Custom required attributes
Hi,
Trying to write a custom attribute condition script to force a comment to get entered when a user selects a certain
option from a radio group e.g no.
dojo.provide("storagereq");
(function() { dojo.declare("storagereq", null, { getValue: function(attribute, workItem, configuration) { var storreq = workItem.getLabel("storagerequests"); return (storreq !== "No"); } }); })();
also added the "required attribute for condition" in operation behaviors section and associated with relevant comment attribute.
Can you advise on what im doing wrong with script.
thanks
|
Accepted answer
note that you cannot tell IF a comment was added or not in scripts.. only in a java server side extension.(advisor)
scripts are not passed access to the state of the workitem prior to the change which caused the script to be invoked Ralph Schoon selected this answer as the correct answer
|
One other answer
what is the ID of the attribute?
I normally name mine with some info like this (using your name) com.sd.defect.attribute.storagerequests you must use the complete ID.. for custom attributes |
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.