how to set ‘ assigned to ‘ field based on the project and the status
Question ID: 104707
0
0

Hello,

I want to change the ‘assigned to’ field based on the project when the defect is new. For example, if I do the following, then the assigned field is set it to either QC_AB or QC_CD and it is not allowing to assigned to anyone once the bug status are changed ( for ex: fixed, failed verification,…..), if I enter the following code in the field change function. Can any one please help me?
If ((Bug_Fields.Field("BG_PROJECT").Value = "1999") And (Bug_Fields.Field("BG_STATUS").Value = "New")) Then
Bug_Fields.Field("BG_RESPONSIBLE").Value = "QC_AB"
Else
Bug_Fields.Field("BG_RESPONSIBLE").Value = "QC_CD"
End if
Thanks,

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on November 16, 2012 12:00 pm
25 views
Answers (1)
0
Private answer

The reason this is happening is due to how you wrote your code. The effect of your code is

If is true then set ''assigned to'' to QC_AB.
In all other cases set ''assigned to'' to QC_CD.

is when the bug has a status of New, and a project value of 1999.

So, if the bug has a project value other than 1999, the ''all other cases'' clause takes effect and the ''assigned to'' is set to QC_CD.

Likewise, if the bug has any status other than New, the ''all other cases'' clause takes effect and the ''assigned to'' is set to QC_CD.

If you want to set the ''assigned to'' value to a specific value ONLY when the status is New and the project is 1999, and in all other cases you want to allow the user to set the ''assigned to'' value, then simple remove the ELSE portion of your If-then-else statement.

Marked as spam
Posted by (Questions: 1, Answers: 101)
Answered on November 21, 2012 12:23 pm
0
thank you very much for your help. Now I know what causes the problem. thanks, Francis
( at November 30, 2012 6:30 pm)
EyeOnTesting

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

X
Scroll to Top