Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC Attribute Customization : Script based Condition not mandating the String field.

Hi All, I need to have a script based condition where the String attribute (DevOps Number) should become mandate when the other Enumeration attribute (Project Type) is "Agile". I am able to get the asterisk mark for the DevOps Number, when I select the Project Type as Agile, But when I save the workitem am not getting any error messages saying "Attribute "DevOps Number" not set". Why conditions are not working for Enum to string type ? Following is the code : dojo.provide("test.DevOpsMandatory"); dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); (function() { var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes; dojo.declare("test.DevOpsMandatory", null, { matches: function(workItem, configuration) { var projStat = workItem.getValue('projectStatus'); if(projStat=="ProjectStatus.literal.l3"){ return false; } else { return true; } } }); })(); Also i have configured this script in pre-condition. Request you to assist on this. Regards, Prabhu

0 votes

Comments

The pre-condition describes that 'Verifies that a work item that matches a condition can only be saved if the selected attributes are different from the default value'.

Then how to set the default value for the string type attribute or Integer attribute?



One answer

Permanent link

If you get the asterisk mark, chances are your code works just find. The problem is with the pre-condition. You should use Required Attributes for Condition.
https://jazz.net/help-dev/clm/topic/com.ibm.team.workitem.doc/topics/t_configuring_dynamic_required_attributes.html

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,126

Question asked: Sep 12 '17, 2:53 a.m.

Question was seen: 2,015 times

Last updated: Sep 13 '17, 11:48 p.m.

Confirmation Cancel Confirm