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

Get a value from attributes to be used in a script in eclipse editior

 Hello I'm trying to write a custom script for the attribute customization that uses a custom risk attribute and the built in severity to  determine the priority in a defect work item. I am able to retrieve the label and value from my risk attribute find but not the built in severity or priority. If I use the get value command with those two attributes nothing outputs to the log, if I use the get label the console just returns null. I need to take both values in in order to compare them to define my priority.

Here is the command I'm using for the script to log the values in the console log.

  try{
   var risk = workItem.getLabel("risk");
   console.log(risk);
   
   var severity = workItem.getValue("com.ibm.team.workitem.attribute.severity");
   console.log(severity);
   
   var priority = workItem.getValue("com.ibm.team.workitem.attribute.priority");
   console.log(priority);
     }

Thanks for any help
  

0 votes


Accepted answer

Permanent link
You have to use the Web UI to find the attribute ID. The Eclipse client unfortunately shows some external ID's. This is a bug and reported. The Web UI Project Area Management shows the real ID's used by attribute customization.

For example "internalSeverity" and "internalPriority"


Jeff Piontek selected this answer as the correct answer

0 votes

Comments

Thank you very much that solved the issue for me, I appreciate the help.

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: Apr 25 '16, 9:41 a.m.

Question was seen: 949 times

Last updated: Apr 25 '16, 11:05 a.m.

Confirmation Cancel Confirm