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

Set Planned_For iteration to specific value in a given SATE ID

How can my code be improved? I want to update the planned for to "Recycle Bin" Iteration value based on state id.


dojo.provide("ibm.custom.script.IterationByStatus");
     dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

     (function() {
         var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
         dojo.declare("ibm.custom.script.IterationByStatus", null, {

             getValue: function(attribute, workItem, configuration) {
             
                             
               var state= workItem.getValue(WorkItemAttributes.STATE);
        console.log(typeof(state))
                    
 if (state === "com.ibm.team.workitem.taskWorkflow.state.s4") Or
(state === "com.ibm.team.workitem.retrospectiveWorkflow.state.s1") Or
(state == "com.ibm.team.apt.storyWorkflow.state.s4")                                 
                 {   workItem.setValue(WorkItemAttributes.PLANNED_FOR, "Recycle Bin");   }
                return               
             }
         });
     })();


0 votes


Accepted answer

Permanent link
I think you have already resolve this question based on this post.
Please let us know if you have any questions. 
Uma venkata Lekkala selected this answer as the correct answer

1 vote

Comments

Yes, this is resolved now. I used your code to print UUID into another attribute

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: Jul 10 '15, 3:11 p.m.

Question was seen: 2,438 times

Last updated: Jul 13 '15, 11:25 a.m.

Confirmation Cancel Confirm