Community in read only mode June 18 & 19
This community will be set in READ ONLY mode for a while on Tuesday June 18 into Wednesday June 19 while we import content and users from our Micro Focus Forums community site. MORE INFORMATION
Highlighted
AKR Absent Member.
Absent Member.
94 views

Allow only tests under certain folders in test plan to be editable by a group of users

How can I set up a workflow script where I can allow a particular group of users to edit only the tests under a certain folder and not all folders etc., How can this be achieved using the workflow script editor? thanks.
0 Likes
3 Replies
Shar_2 Absent Member.
Absent Member.

Re: Allow only tests under certain folders in test plan to be editable by a group of users

You can accomplish this through permissions (Customize | Groups)for that group by using the Data hiding filter and selecting to hide data in all folders except for the folder that group is allowed to edit.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Allow only tests under certain folders in test plan to be editable by a group of users

If you want not only allowe it to readonly but also to hide the records then use the group and data hiding filter. It is the simplest way (as Shar wrote).

If you want just to make some test readonly and some test in some folder to be edited than try this code in test plan script:

Function TestPlan_Test_FieldCanChange(FieldName, NewValue)
On Error Resume Next
TestPlan_Test_FieldCanChange = false
if User.IsInGroup("A00") and Test_Fields.Field("TS_SUBJECT").Value.Path = "Subject\b" then
TestPlan_Test_FieldCanChange = true
end if
On Error GoTo 0
End Function

Sub TestPlan_Test_MoveTo
On Error Resume Next
for i = 1 to Test_Fields.Count
Test_Fields.FieldById(i).IsReadOnly = true
next
if User.IsInGroup("A00") and Test_Fields.Field("TS_SUBJECT").Value.Path = "Subject\b" then
for i = 1 to Test_Fields.Count
Test_Fields.FieldById(i).IsReadOnly = false
next
end if
On Error GoTo 0
End Sub

where folder full path is "Subject\b".
0 Likes
AKR Absent Member.
Absent Member.

Re: Allow only tests under certain folders in test plan to be editable by a group of users

Thank you both. I tried the one that Shar sent for the time being.
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.