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

how to display a error or warning message on the workitem with javascript / dojo ?

 Hello,

In RTC, when we forget a mandatory field when creating a workitem, we have a nice red message at the top of the workitem screen.
Is it possible, in a Validator or DefaultValue or CalculatedValue script, to display a message of this type in the same place?
How to access the DOM of the RTC page from javascript?
Through dojo?

The real question is : is it possible, in (by example), a condition Script, to access the DOMof the current page displayed by RTC? I wanted to have access to a html element an be able to modify his innerHtml by document.getElementById("xx").innerHtml or some stuff like that. 

0 votes

Comments

I know that some have added hover information to the work item web UI using a theme. I have no example and I am convinced that you should stay well within the limits of https://jazz.net/wiki/bin/view/Main/AttributeValueProviders .


It is possible to create custom attribute presentations.



One answer

Permanent link
One solution : 

 I know it's HORRIBLE and please, use it ONLY if you have no other solution :)

In my javascript I use a code like this : 

let balise = document.getElementsByClassName("validationMessageAnchor")[1];
balise.innerHTML = '<span style="display:block;.....etc...

This display a message just after the workitem type and Id on the top of the workitem screen. 
I know,I know.... it's BAD and not durable !!!! 

Sorry. :)


0 votes

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
× 12,019
× 152
× 13
× 4

Question asked: Feb 19 '19, 9:03 a.m.

Question was seen: 2,438 times

Last updated: May 06 '20, 1:33 p.m.

Confirmation Cancel Confirm