Is it possible to add an image as an attachment for new defects created in ALM?
Question ID: 110458
1
0

Is it possible to add an image as an attachment to a new defect for all defects created? We would like for all defects to include an attached image.

Marked as spam
Posted by (Questions: 239, Answers: 31)
Asked on April 21, 2023 2:47 pm
77 views
Answers (1)
1
Private answer

The workflow below will attach an image or file once the defect has been created. You will need to place the workflow into the Bug_AfterPost Sub. You will need to edit the 'theAtt.FileName' line to point to an image or file in a shared location so that it's available for all users. I recommend that this workflow is tested in your test environment before implementing it in production.

Dim tdc
Dim theAtt
Dim attFact
Dim bugFact
Dim bugItem
Set bugFact = TDConnection.BugFactory
Set bugItem = bugFact.Item(Bug_Fields.Field("BG_BUG_ID").Value)
Set attFact = bugItem.Attachments
Set theAtt = attFact.AddItem(null)
theAtt.FileName = "C:UsersAdministratorDesktopDefect AttachmentsDefect Attach Image.PNG"
theAtt.Type = 1
theAtt.Description = "New Defect Attachment"
theAtt.Post
Actions.Action("Defects.RefreshAll").Execute

Marked as spam
Posted by (Questions: 2, Answers: 300)
Answered on April 21, 2023 2:48 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top