It's all about the answers!

Ask a question

Change an attribute input field value automatically by event

Liney Reis (149) | asked Oct 09 '12, 7:05 p.m.

I need to reset an attribute input field automatically by changing other input field (value set picker).

Is it possible using dojoattachevent onchange?

How can I do that?

Thanks in Advance!

2 answers

permanent link
Ralph Schoon (63.2k33646) | answered Oct 10 '12, 2:23 a.m.
I would rather look into and and try out if you can do that using the providers or Java script.
If so it would work in the Web UI as well as in the Eclipse UI.

Liney Reis commented Oct 15 '12, 3:13 p.m.

I´ve readed the articles, but still looking for a way to clean the fields dinamically by changing other input field.

permanent link
Ralph Schoon (63.2k33646) | answered Oct 16 '12, 6:34 a.m.
edited Oct 16 '12, 6:58 a.m.
Liney, I have thought about it some more and I see no real option to do that using scripts. Sorry for misleading you. As far as I can tell, there are only the following options to change an attribute value using scripts:

  • Default value provider
  • Calculated value provider.

Default value provider only sets the first time.

You could potentially use a calculated value provider to clear an attribute. Unfortunately I see no way how to distinguish the newly entered value from the old value that got cleared away. As long as the other attribute values are telling to "clear" the value it gets cleared, no matter what you enter. This would not be an issue if you could put a "valid" value on the new attribute value, because that could override the clearing. You could potentially enhance the code below.

I don't find this very easy and I would rather use a precondition to do this. See the RTC Extensions Workshop (follow up action) and examples such as or others you can find in the internet.

Maybe I am missing something here. If others have better solutions, I would be happy to see them.



(function() {
    var WorkItemAttributes =;

    dojo.declare("", null, {

        getValue : function(attributeId, workItem, configuration) {
            console.log("ClearOnValueCalculated - Start");

            try {
                var attributeValue ="";
                var otherAttributeLabel = "";
                attributeValue = workItem.getValue(attributeId);
                otherAttributeLabel = workItem.getLabel(WorkItemAttributes.SEVERITY);
                console.log("Severity " + otherAttributeLabel);
                if (otherAttributeLabel == "Blocker") {
                    return "";
                return attributeValue;
            } catch (e) {
                console.log("Exception:" + + " message " + +" " + e.toString());

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.