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

Custom error message for mandatory attributes possible?

I have found a description for a "required properties" pre-condition which is not available (anymore?) but nothing else.

Can someone help me out and tell me if it's possible to configure custom error messages for mandatory attributes that were configured with the built-in pre-condition?
Or is the only way to get that done to write an extension (though then I am guessing I won't have that asterisk to indicate that the attribute is mandatory)?

1

1 vote


Accepted answer

Permanent link

Hi Illona,

the only option I see is to write your own work item save advisor. You will have to use the built in advisors in addition to your own advisor if you want to have UI support to show which attributes are required (the asterisk) and in that context you will have to live with whatever hover is provided by the built in stuff.

The reason is quite complex and not obvious. I wrote about this in https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/ section How Does the RTC Code Work?

What happens is that RTC provides an extension point to prevent saving when attributes are required etc. The extension works if you press the save button. To show the user that something is required or make it read only etc. the UI needs to compute this before the save button is pressed. To allow for that there is a hardcoded relationship built into the UI code working with the configuration of the built in advisors to show the information.

It is impossible to hook up custom advisors here. That is why you can not make any impact on the UI. You can only show specific errors when the user presses the save button.

Ilona Krammer selected this answer as the correct answer

0 votes


One other answer

Permanent link

 Actually I think that the only way is to write an extension (a custom pre-condition) that checks the values of the mandatory attributes and returns and error when any of them is empty.

You can set the error message in the IAdvisorInfo object. 

1 vote

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: May 30 '18, 2:01 a.m.

Question was seen: 1,990 times

Last updated: May 30 '18, 3:50 a.m.

Confirmation Cancel Confirm