How can I disable the Send email buttons in the defect module?
Question ID: 105355
1
0

We would like to disable the manual buttons for sending email from the defect module, is this possible?

Marked as spam
Posted by (Questions: 100, Answers: 5)
Asked on April 24, 2014 4:10 pm
182 views
Answers (2)
2
Private answer

This is possible, you will need to disable the actions behind these buttons, the example below will make these buttons non functional for all users/groups.

You will need to make sure that the Case statement for defects is un-commented out along with the ''End Select'' a ''Case Else'' needs to be added with ''ActionCanExecute = DefaultRes'' and ''ActionCanExecute = DefaultRes'' needs to be removed from outside of the select statement. I changed the name of the function in the Case statement from Defect_ActionCanExecute to Bug_ActionCanExecute so that the name would look similar to the other functions for the Defect/Bug module for consistancy. I have tested this on ALM 11 and it may work with other versions.

Function ActionCanExecute(ActionName)
'Use ActiveModule and ActiveDialogName to get
'the current context.
On Error Resume Next

'Use the following script to redirect this function to the module specific function:
Select Case ActiveModule
Case ''Defects''
ActionCanExecute = Bug_ActionCanExecute(ActionName)
' Case ''Test Lab''
' ActionCanExecute = TestLab_ActionCanExecute(ActionName)
' Case ''Test Plan''
' ActionCanExecute = TestPlan_ActionCanExecute(ActionName)
' Case ''Requirements''
' ActionCanExecute = Requirements_ActionCanExecute(ActionName)
' Case ''Management''
' ActionCanExecute = Management_ActionCanExecute(ActionName)
' Case ''Test Resources''
' ActionCanExecute = Resources_ActionCanExecute(ActionName)
' Case ''Business Components''
' ActionCanExecute = Components_ActionCanExecute(ActionName)
' Case ''Dashboard''
' ActionCanExecute = Analysis_ActionCanExecute(ActionName)
' Case ''Business Models''
' ActionCanExecute = BusinessModels_ActionCanExecute(ActionName)
Case Else ActionCanExecute = DefaultRes
End Select

On Error GoTo 0
End Function

'Create a new function in the Defects module script, the function should contain the following:

Function Bug_ActionCanExecute(ActionName)
On Error Resume Next
If (ActionName = ''act_SendbyEmail'' or ActionName = ''MAIL_BG_DETECTED_BY'' or ActionName = ''MAIL_BG_RESPONSIBLE'' or ActionName = ''act_sendbyemail_BG_Detected_BY'' or ActionName = ''Defects.SendByEmailDetectedBy'' or ActionName = ''Defects.SendByEmailAssignedTo'' or ActionName = ''BugDetails.SendByEmailAssignedTo'' or ActionName = ''BugDetails.SendByEmailDetectedBy'' or ActionName = ''BugDetails.SendByEmail'')Then
MsgBox ''You don't have enough permissions to send an e-mail''
Bug_Actioncanexecute = false
else Bug_ActionCanExecute = DefaultRes
End If

On Error GoTo 0
End Function

Marked as spam
Posted by (Questions: 0, Answers: 364)
Answered on April 24, 2014 4:13 pm
0
This worked great!!
( at May 14, 2014 5:00 pm)
0
Private answer

you can hide buttons next example hide the pass all, fail all, add step and delete step:

Function Validate_ManualRunner_Action(ActionName)
On Error Resume Next
LastActionName= ActionName

If ActionName = ''act_exec_steps'' Then
Actions.Action(''act_pass_all'').Visible = FALSE
Actions.Action(''act_fail_all'').Visible = FALSE
Actions.Action(''act_add_step'').Visible = FALSE
Actions.Action(''act_del'').Visible = FALSE
End If
On Error GoTo 0
End Function

Marked as spam
Posted by (Questions: 1, Answers: 4)
Answered on June 29, 2015 9:39 pm
EyeOnTesting

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

X
Scroll to Top