New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Cadet 3rd Class
Cadet 3rd Class
543 views

ALM Transition Rules - Negative Condition

Jump to solution

Hello Everyone,

I would like to set up a transition rule like below.

User assigned with Project Manager role should not move a defect from Status A to B but allowed to move from any to any. So how to setup this? Is there any option to specify only this EXCEPT condition?

or I need to setup all allowed positive scenarios with all possible combinations.

Thanks.

 

Accept as solution/Give Kudos to the author if the piece of information answered/helped you to solve your problem.
All the thoughts here are mine not related to my employer nor anyone.
Test Automation Ecstasy
0 Likes
1 Solution

Accepted Solutions
Highlighted
Fleet Admiral
Fleet Admiral

I would avoid the transition rules to do this. Just keep the default, which is the same as any to any.

Then define the exception in Bug_FieldCanChange and return False if the exception conditions are fulfilled. Something like

If User.IsInGroup("Project Manager") AND Bug_Fields.Field("BG_STATUS").Value = "A" AND NewValue = "B" Then
     MsgBox "Not Allowed"
     Bug_FieldCanChange = False
     Exit Function
End If
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]

View solution in original post

2 Replies
Fleet Admiral
Fleet Admiral

The quick way is to create the list of status to be allowed.

For Ex: Project Manager can change everything except from Any to "Re-Test". then create a list with all the available transitions except this and call it when the status is So & the user group is "PM". 

if you dont wanna go to the Workflow, you have to manuall allow the needed transitional status from the Transitional Rules for the Status Field.

(If this helped, accept as solution )
(Posts and opinions made here are my own and do not reflect the opinions of my employer)
Highlighted
Fleet Admiral
Fleet Admiral

I would avoid the transition rules to do this. Just keep the default, which is the same as any to any.

Then define the exception in Bug_FieldCanChange and return False if the exception conditions are fulfilled. Something like

If User.IsInGroup("Project Manager") AND Bug_Fields.Field("BG_STATUS").Value = "A" AND NewValue = "B" Then
     MsgBox "Not Allowed"
     Bug_FieldCanChange = False
     Exit Function
End If
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.