Required Attributes For Condition is not working properly
Hello All,
In my demo project i have added new attribute named as 'RootCauseAnalysis'. My task is to make this field as mandatory when user selects severity as Critical. so to do this i have set "Require attributes for condition" precondition for this newly added attribute.
I can see Asterisk sign on "RootCauseAnalysis" field but, even if i keep this field empty, application accepts empty string and saves the work item. I think it should show "Attribute 'RootCauseAnalisis' is not set" error.
I have used below script for same: (CLM 6.0.3)
dojo.provide("com.example.Condition");
(function() { dojo.declare("com.example.Condition", null, { matches: function(workItem, configuration) { var workitem = com.ibm.team.workitem.api.common.WorkItemAttributes; var severity = workItem.getValue(workitem.SEVERITY); if(severity == "severity.literal.l5") { return true; } else { return false; } } }); })();
Please let me know what i am missing while setting precondition.I referred below link:
|
Accepted answer
I have tried 'Required Attributes For Condition' recently with 6.0.2 and 6.0.4 and both works fine.
Snehal Yendhe selected this answer as the correct answer
Comments
Snehal Yendhe
commented Feb 14 '18, 6:50 a.m.
Hi Don,
Thanks for this information. I have added the
[dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); ] in my code and now its working properly. |
One other answer
Ralph Schoon (63.4k●3●36●46)
| answered Feb 14 '18, 2:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER In addition to Don's comment, I see over and over again that it is not clear how operational behavior works and it is frequently configured wrong and not called when the user expects it to be.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.