Need to stop users from adding R&D Comments (defects) without using the ”add comment” button
Question ID: 108000
1
0

We need a way to stop users from just clicking in the comments field on defects and typing their comment. This is messing up synchronizations and is generally bad practice.

What can we do?

Marked as spam
Posted by (Questions: 193, Answers: 14)
Asked on November 1, 2017 4:24 pm
53 views
Answers (1)
1
Private answer

There is a way in Workflow to handle this.

In the Script Editor (you need to be a Project level Admin, and this code would need to be in each project where you wan the behavior).

You will need to add code to 2 ''methods'' in the Workflow:

1) in Common Script / Function ActionCanExecute(ActionName) :

Add this code BEFORE the ''ActionCanExecute = True'' line

'The code below will enable R/W on BG_DEV_COMMENTS (defect comments field)
'only when the ''Add comments'' field has been pressed
'code in Bug_MoveTo was added to make the BG_DEV_COMMENTS field read-only by default
if ActionName = ''FieldComments.AddComment'' then

msgbox ''Enabling Comments''

Bug_Fields(''BG_DEV_COMMENTS'').IsReadOnly = False

end if

2) In the Defects module script / Sub Bug_MoveTo :

Add this code AFTER any layout setting code (layout code sets the field properties)
It would be AFTER the line with ''WizardFieldCust_Details'' if you previously used the script generator wizard for ''Defect Details Field Customization'';

'Make sure comments are read-only
'Code in ActionCanExecute will test to see if Add Comments button
'has been pressed before allowing comments to be added.
Bug_Fields(''BG_DEV_COMMENTS'').IsReadOnly = True

Marked as spam
Posted by (Questions: 4, Answers: 509)
Answered on November 1, 2017 4:46 pm
0
The comments field enables and allows ''correct'' addition of comment with user's name and date... BUT, at entry time, the entire comment field is read/write. A mis-behaving user could possibly edit the previous comments. Other EyeOnTesing post explains other possible solution (more custom code): http://eyeontesting.com/questions/2034/how-to-protect-rd-comments.html
( at November 1, 2017 4:50 pm)
EyeOnTesting

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

X
Scroll to Top