Highlighted
Absent Member.
Absent Member.
2058 views

permission to change defect status by group and by the group of the defect detected by user

Jump to solution
Hello

Is it possible to prevent from a certain group to change defect status to "closed" only if the defect "detected by" user is from other certain group?

Thanks
Ido
Tags (2)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Hi

 

Found in this forum samples showing how to add this condition.

 

Function Bug_FieldCanChange(FieldName, NewValue)

On Error Resume Next

testername = Bug_Fields("BG_DETECTED_BY").Value  

if FieldName = "BG_STATUS" and User.IsInGroup("developer") and TDConnection.Customization.Users.User(testername).InGroup("qa") and NewValue= "Closed" then        

Bug_FieldCanChange = false        

msgbox "detected by group can close this defect"    

else        

Bug_FieldCanChange = DefaultRes

end if

On Error GoTo 0

End Function

View solution in original post

0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

Yes; you need to use workflow code to check group of submitter and decide what to do with the status.

PS: Code will consider submitter's current role not the role a user had in the past so you might want to consider this scenario: what if submitter got his/her group changed from one group to another

0 Likes
Highlighted
Absent Member.
Absent Member.

Hello Ido,

Yes that is possible with workflow code, please see my sample below that can helps you


Function Bug_FieldCanChange(FieldName, NewValue)
  On Error Resume Next
  if FieldName = "BG_STATUS" and User.IsInGroup("type_your_group") and NewValue= "Closed" then
         Bug_FieldCanChange = False
         msgbox "User does not have permissions to change the defect status to closed"
     else
         Bug_FieldCanChange = DefaultRes
  end if
  On Error GoTo 0
End Function


You can create a different code or improve that one depending on your needs.


Best regards,

Sue Sevilla
HP QC/ALM Support Team

(If this post or any other post helps to resolve your issue or query, please mark the thread as solved)

(Posts and opinions made here are my own and do not reflect the opinions of my employer HP in any way)

0 Likes
Highlighted
Absent Member.
Absent Member.

Thank you suese.

 

how to add another condition that the defect was created ("DETECTED BY" field) by another group?

 

the idea is this: if the developer opened the bug then he can change status to "closed" but if the tester opened the bug then the developer won`t be able to change status to "closed".(but the tester can)

 

 

0 Likes
Highlighted
Absent Member.
Absent Member.

Hello Ido123

 

 

That can be possible, however that will take some time to me to create or change the code.

I suggested you to check the workflow best practices of ALM, you can find that in documenation.

There you will find samples and how to implement that in the app.

 

 

Best regards,

Sue Sevilla
HP QC/ALM Support Team



(If this post or any other post helps to resolve your issue or query, please mark the thread as solved)

(Posts and opinions made here are my own and do not reflect the opinions of my employer HP in any way)

0 Likes
Highlighted
Absent Member.
Absent Member.

Hi

 

Found in this forum samples showing how to add this condition.

 

Function Bug_FieldCanChange(FieldName, NewValue)

On Error Resume Next

testername = Bug_Fields("BG_DETECTED_BY").Value  

if FieldName = "BG_STATUS" and User.IsInGroup("developer") and TDConnection.Customization.Users.User(testername).InGroup("qa") and NewValue= "Closed" then        

Bug_FieldCanChange = false        

msgbox "detected by group can close this defect"    

else        

Bug_FieldCanChange = DefaultRes

end if

On Error GoTo 0

End Function

View solution in original post

0 Likes
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.