It's all about the answers!

Ask a question

RTC Java API - adding informative icon/text next to work item fields?


Tuan Nguyen Minh (691521) | asked Nov 16 '14, 11:34 p.m.
edited Nov 16 '14, 11:36 p.m.
Hi there, in an Operation Adviser/Participant, beside the use of "IReportInfo" & the "collector" object to put some extra information (info/warn/error) on top of the work item's editor/view. Is there any API to add an informative icon/text next to a field of the work item?
Let's say I have an Operation Participant that check for the valid of work item field, when user put invalid data & click save button --> I will stop the save & put an error message on top of the editor saying about the error. Instead of listing down all the error fields there, I could imagine of putting there the message "Invalid work item fields." only, and the user can identify the error fields by looking for an error icon appear next to the field.

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Nov 16 '14, 11:41 p.m.
No, there is no mechanism to add text to individual fields.
Tuan Nguyen Minh selected this answer as the correct answer

Comments
Ralph Schoon commented Nov 17 '14, 2:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As far as I can tell this is the correct answer. There is no mechanism I am aware of besides the ones you mention to do this. I think it would be a good Idea and you might want to create an enhancement request.

What you can do is to provide the name of the attribute in the error you display by returning the information in the collector.

One other answer



permanent link
Nate Decker (37814761) | answered Jun 26 '17, 4:06 p.m.

 Depending on how badly you want to do this, there might be a way to "fake it".


You could use theming to provide these error icons next to each and every field and then have them only conditionally display based on an attribute value of the work item. The attribute's presentation could be hiddent by the theme as well. The attribute could maybe be a string of semi-colon separated attribute IDs. It would default to blank and your validation mechanism would need to set this attribute to a value corresponding with the attributes that need to be set.

So this solution would be a combination of JavaScript and HTML theming combined with a follow-up action that acts as a pre-condition (which goes against best-practices). The follow-up action would have to allow the work item to be saved, but revert all modified attributes back to their previous values and set the meta-attribute to display the error.

It sounds hard to me and probably not worth the effort. But I suspect it is technically possible.

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.