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

how to change the description based on other attribute

 Hi All,

Can I set some default value to the description field if the work item is defect and the Classification attribute is risk.

here classification is a multi select (enumeration) and rist is the literal.

Thanks
Surender

0 votes



3 answers

Permanent link
 Hello Surender,
you may want to try a calculated value set provider,
https://jazz.net/library/article/1003/#calc-values
use it to populate description based on classification attribute.

Please send me an email (eric_jodet@fr.ibm.com)
so I can share with you a working example.

Thanks,
Eric

0 votes


Permanent link
Please be aware that the default value provider are only of limited use. They are only calculated at the creation of the work item where you don't yet have many user selected values e.g. a user selected risk value. There are only very few usable defaults at this point in time.

You can of course use a calculated value script, however that is always calculated, so you have to decide if you return a modified value, or not, which is really hard sometimes. Therefore the suggestion is to use calculated values only with read only attributes.

0 votes


Permanent link
 Thanks Ralph Schoon and EricJodet,
I have written a .js which does the work for me on saving the work item but there is one more problem here.

I have a script based condition already and now i have script based calculated value both these java scripts
is based on the same attribute.

dojo.provide("com.abc.tools.workitem.attribute.defectclassification"); 

in this case I`m getting a warning saying the class name is already used and the class name is not modifiable.

How can I get rid of this?

Note : Both the scripts are working fine if I activate only one of those.

Thanks
Surender.

0 votes

Comments

 Hello Surender,

if you get such warning, you possibly have another script that declares the same class.

Check Project Area attachments and remove unnecessary javascripts.

Eric

Right, you can have multiple scripts running on the same attribute. You have to make sure that each script has a unique identifier in the declares section. If you copy scripts, at least change the class name.

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

Question asked: Aug 07 '14, 6:07 a.m.

Question was seen: 3,650 times

Last updated: Aug 12 '14, 1:54 a.m.

Confirmation Cancel Confirm