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

Return priority field with gif

Hello again, i am working on a script that takes in two values and returns out the priority based on an else if statement. The script runs fine and will return the priority but it comes out as just Medium, I need it to come out as Medium with the gif image that is set in the enumerations. Does anyone know what that attribute id might be as I think that might be my idea as why it is not outputting right.

Here is the script I'm using

       if (risk === 'High'   & severity === 'Minor' ){
          priority = 'Medium';
        }else if (risk === 'High'  & severity === 'Major'  ){
          priority ='High';
        }else if (risk=== 'High'  & severity === 'Critical' ){
          priority ='Critical' ;
        }else if (risk === 'Low'  & severity === 'Minor'  ){
          priority ='Low' ;
        }else if (risk === 'Low'  & severity === 'Major'  ){
          priority ='Medium' ;
        }else{
           priority = 'Critical';
          

Thanks

0 votes



One answer

Permanent link
You need to use the Id of the Priority Enumeration, such as "priority.literal.l07", not its literal value "Medium". You are setting an invalid value to the attribute and that's why the associated icon does not come up.

0 votes

Comments

Thanks but putting in the priority literal, just makes it say priority literal.

I don't understand your intention. Why do you insist on putting the literal value? You can even put in a random string if you really want, but the script will not work. The only valid value for a Priority enumeration type attribute is the Id.

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, 12:29 p.m.

Question was seen: 1,661 times

Last updated: Apr 26 '16, 8:10 p.m.

Confirmation Cancel Confirm