It's all about the answers!

Ask a question

how to make a textbox mandatory on "Picker Enumeration list"


Pravin Patil (104138133) | asked May 28 '15, 8:58 p.m.
edited May 29 '15, 2:42 a.m. by Ralph Schoon (63.1k33646)

I have the below script to make a textbox REQUIRED, if the value=other from a picker enumeration list is "other", but its not working. The custom attribute id is "reason_for_request1" and the literal is "reason_for_request.literal.l12"

dojo.provide("org.example.workitems.providers.ProjReco");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {
  var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes;

  dojo.declare("org.example.workitems.providers.ProjReco", null, {
    matches: function(workItem, configuration) {
      var relnote =  workItem.getValue("reason_for_request1");
      return (relnote === "reason_for_request.literal.l12"); // Other
    }
  });
})();

I have similar conditional script working for dropdown enumeration (not multiselect). Does it mean that this conditional script doesn't work with Picker Enumeration?

Please let me know what's wrong with the script...


Comments
Don Yang commented May 29 '15, 1:04 a.m. | edited May 29 '15, 2:58 a.m.

picker or checkbox enumeration can be multiple values hence you may need to use Array to pick up the value.
you may check with https://jazz.net/library/article/1360 for more details and debugging tips on enumeration list values.

Be the first one to answer this question!


Register or 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.