Set Planned_For iteration to specific value in a given SATE ID
Uma venkata Lekkala (52●8●19)
| asked Jul 10 '15, 3:11 p.m.
edited Jul 12 '15, 5:32 a.m. by Ralph Schoon (63.6k●3●36●46)
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 } }); })(); |
Accepted answer
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
Comments
Uma venkata Lekkala
commented Jul 13 '15, 11:25 a.m.
Yes, this is resolved now. I used your code to print UUID into another attribute |
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.