Set default values for new Defect
I wish to use Workflow to set default values for both Detected in Release and Detected in Cycle when creating a new Defect.
However, when I set one of these values using Workflow, it blanks the other value. E.g. when I set a value for Detected in Release, it sets Detected in Cycle to blank, and vice versa.
Is there a way to be able to set both these values?
The workflow code I am using is in the Bug_New sub:
currRelease = "Release 1.0"
currCycle = "Drop 2"
' Set default value for "Detected in Release" field
Bug_Fields("BG_DETECTED_IN_REL").Value = currRelease
' Set default value for "Detected in Cycle" field
Bug_Fields("BG_DETECTED_IN_RCYC").Value = currCycle
Thanks for any assistance!
Re: Set default values for new Defect
As I know this fields aren't string type. So you should create 2 objects. One for Releases and one for cycles and only then assign them to Defect fields.
Something like this
RelFact = TDConnection.ReleaseFactory
RelList = RelFact.NewList("<Your Filter>")
Bug_Fields.Field("BG_DETECTED_IN_REL").Value = RelList.Item(1)
And similar for cycles.