How to create a script based on resolved state?
Hello,
I am trying to create an attribute condition based "Resolved" set state.
Could please somebody help me?
* I don't want to use "required attributes for Type and State", because, I'll need to have two conditions on same script (sev1 and resolved status). For Sev1, script is working fine, but for resolved status, nothing is happening.
current script (not working):
dojo.provide("ibm.cio.required.sev1H");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes"); (function()
{
var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes; dojo.declare("ibm.cio.required.sev1H", null, { matches: function(workItem, configuration) { var state = workItem.getValue(WorkItemAttributes.STATE);
return (state === "11");
// status = resolved } }); })();
--------------------
element details:
<option value="com.ibm.team.workitem.defectWorkflow.state.s11">Resolved</option>
Thanks!
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Oct 12 '18, 2:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Oct 12 '18, 2:33 a.m. "Resolved" is a state group. I don't think state groups are available in the JavaScript attribute customization API. You have to code in all the states you consider resolved. |
Hello,
When associating Don's comment (https://jazz.net/forum/users/dyang) with my already saved script, the attribute condition is working fine. Please check below the current code: Condition: Ticket must be a Sev1 and State moving from any one to Resolved.
------------------------------------------------------------------------------------------------
dojo.provide("org.example.workitems.providers.FinishedCondition");
})();
------------------------------------------------------------------------------------------------
Thanks and best regards!
|
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.
Comments
Hi Don,
It seems there was some issue on my server, and the updates made and saved on client were not being reflected as fast as normally is on UI/browser.
Thank you very much!
Unfortunately, your state is not working either =(
I am still trying with other possible combinations, but with no success, so far.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Accessing_an_item_s_Status_attri explains states. If in doubt, debug or log the value of the attribute.
Process Enactment Workshop for the Rational solution for Collaborative Lifecycle Management has some hints in the last lab.
Hi Ralph, thanks for your updates, two links you sent are very helpful!
I'll share my script as soon as I finish it in order to help others.
Thanks!