It's all about the answers!

Ask a question

How to make a mandatory field when I change to another state?


sergio palacio (1123) | asked Mar 25 '13, 4:58 p.m.
edited Apr 02 '13, 9:01 a.m. by Ralph Schoon (63.7k33648)
Hi.

I need make the Comments/Discussion field mandatory whenever the ticket goes from "In Progress" to "Assigned" state.

Do you have anny guide  to do it? please. Or anyone can explain it to me?

thanks in advance.



.

2 answers



permanent link
Krzysztof Kaźmierczyk (7.5k480103) | answered Mar 25 '13, 5:12 p.m.
Hello Sergio,
there is jazz.net article describing that: https://jazz.net/library/article/537/ look at the section "Dynamic required attributes"

Let me know if it helps for you.
Regards,
Krzysztof Kazmierczyk

Comments
Ralph Schoon commented Mar 26 '13, 6:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I would also suggest using the Dynamic Required Attribute for Type and State precondition, rather than using a custom solution such as an advisor or a script based condition.


permanent link
Abuzaid Shaikh (89146) | answered Mar 26 '13, 4:26 a.m.
 Hi Sergio,

You can do that by writing a precondition plugin OperationAdvisor.

In the plugin you will have to:

  1.  Get the value of the Disussion/Comment. by:
String commen = sourceworkItem.getComments().toString();

      2. Check if the string is empty.
	

if(commen.isEmpty()){
IReportInfo problem = collector.createInfo(summary,description,type);
problem.setSeverity(IProcessReport.ERROR);
collector.addInfo(problem);
}


      3. If the string is empty than pass an error message as given above, else do nothing.

Hope this helps.


Regards,
Abuzaid      

Your answer


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.