The community has a new login process
The community single sign-on system has been changed. Learn more about it HERE
Highlighted
br1151 Respected Contributor.
Respected Contributor.
84 views

How to add a pop up when a test/test folder is created under a particular folder in test plan

Jump to solution

We have created a folder called trash and asked the users to put all items to be deleted under this folder. I want a message pop up come up saying "You have added a new test/test folder and this folder would be cleaned up every month" whenever a test case or a test folder is added to trash folder so that the users would know the folder is cleaned up every month. Could you please help me with this.

0 Likes
1 Solution

Accepted Solutions
NEW_ALM12 Honored Contributor.
Honored Contributor.

Re: How to add a pop up when a test/test folder is created under a particular folder in test plan

Jump to solution

Try this in Common Script module under Action can execute function. 

I have not seen or found MoveTo Action name. Hence, I would uncheck "Move" permission on the UserGroup so that users in that group wont be able to do MOVE or drag and drop action. They would only do CUT and PASTE. Hence, trigger the Msgbox. 

Function ActionCanExecute(ActionName)
  On Error Resume Next
if ActionName = "TestPlanTree.Paste" Then
  result=  msgbox ("Any Test Case/s or Test Folder/s in TRASH folder would remains 30 days only.",vbYesNo,"TC / TF Retention Policy" )
  If result = vbNo Then
     Msgbox "You have canceled the action. Artifacts won't be moved to TRASH folder." , 64
  ActionCanExecute = False
  Exit Function
Else ActionCanExecute = True
     Msgbox "Your artifacts are moved to TRASH folder.",64
  End If
End if
On Error GoTo 0
End Function

Hope this helps.

0 Likes
2 Replies
NEW_ALM12 Honored Contributor.
Honored Contributor.

Re: How to add a pop up when a test/test folder is created under a particular folder in test plan

Jump to solution

Try this in Common Script module under Action can execute function. 

I have not seen or found MoveTo Action name. Hence, I would uncheck "Move" permission on the UserGroup so that users in that group wont be able to do MOVE or drag and drop action. They would only do CUT and PASTE. Hence, trigger the Msgbox. 

Function ActionCanExecute(ActionName)
  On Error Resume Next
if ActionName = "TestPlanTree.Paste" Then
  result=  msgbox ("Any Test Case/s or Test Folder/s in TRASH folder would remains 30 days only.",vbYesNo,"TC / TF Retention Policy" )
  If result = vbNo Then
     Msgbox "You have canceled the action. Artifacts won't be moved to TRASH folder." , 64
  ActionCanExecute = False
  Exit Function
Else ActionCanExecute = True
     Msgbox "Your artifacts are moved to TRASH folder.",64
  End If
End if
On Error GoTo 0
End Function

Hope this helps.

0 Likes
br1151 Respected Contributor.
Respected Contributor.

Re: How to add a pop up when a test/test folder is created under a particular folder in test plan

Jump to solution

Thank you very much. This works perfectly, 

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.