Need Script to Determine Cycle by Date
We are leveraging the Target Cycle field on the TestRun object, and want to compare the Target to an actual. We added a User_Field (Executed_Cycle) on the TestRun, which currently is entered manually. My goal is to have script populate this field based on the trigger of clicking 'Run', but to do this I need to perform a lookup to the Cycle table , and determine which cycle [today's date] is in, by comparing today's date to the beginning and end dates of each of the Cycles in the Release. This is where I'm stuck. I would be greatful for suggestions!
Re: Need Script to Determine Cycle by Date
I would assume you have associated the folders in Test Lab to Cycles? In that case you already have a reference to that Cycle available in each new Run. For example in Run_MoveTo:
Set CycleObject = Run_Fields("RN_ASSIGN_RCYC").Value
And now you can easily check the start and end dates and compare them to today's date:
MsgBox CycleObject.StartDate MsgBox CycleObject.EndDate MsgBox Date ' VBScript function for current system date MsgBox CycleObject.EndDate > Date 'True or False
[Please do not contact me off line for receiving support. Use the forum!]