It's all about the answers!

Ask a question

Need a customized code that flips the status of the workitem automatically


Neha Lourenco (112) | asked Sep 10 '15, 6:44 a.m.
Hello All,

IBM informed that they do not support attribute customization. I want to automate flipping the status of the workitem form 'resolved' to 'closed'

Can anyone help on the same?

Regards,
Neha Lourenco

One answer



permanent link
sam detweiler (12.4k6177201) | answered Sep 10 '15, 7:05 a.m.
can u describe a little more, what you mean by 'automate'.

some time later,  or when something else happens?

one can write code to do all kinds of things..

Comments
Neha Lourenco commented Sep 10 '15, 7:40 a.m.

Sure Sam!!

Whenever the Support Request is moved to 'Resolved' state, the close action should be automatically triggered and the ticket should be 'closed'

The engineer need not close the ticket explicitly

Regards,
Neha Lourenco


Ralph Schoon commented Sep 10 '15, 7:43 a.m. | edited Sep 10 '15, 7:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You can do that in a participant and you can find relevant code here: https://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/

That participant closes the work item die to its children status, but it could also change the sate and save the original work item on detection that it is in the resolved state.


sam detweiler commented Sep 10 '15, 7:44 a.m.

sounds like you have an extra state that you don't intend to use. (resolved).

whats the difference in the business value of the two states?


Ralph Schoon commented Sep 10 '15, 7:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I find the approach questionable however. Why don't you get rid of one of the states? If this is automatic, one of the states is not needed and should be removed from the workflow.


Neha Lourenco commented Sep 10 '15, 7:53 a.m.

Hello Ralph/Sam,

You'll have a valid question, I need to implement 2 things,
1) Support Requests that are in Resolved state should be move to Closed state automatically after 2 days
2) The defect workitem that we have created should be moved from 'In Assembly Test' to 'In Testing' for datawarehouse defects. (NOTE: we have defects for various components, hence, we cannot just remove these states from the workflow)

I cannot open below link, :(
https://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/

Regards,
Neha Lourenco


Neha Lourenco commented Sep 10 '15, 7:55 a.m.

Ralph Schoon commented Sep 10 '15, 7:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

These are two different work item types which likely have different workflows. It makes no sense that work items change their state automatically after 2 days or so. You can do that e.g. using a plain Java API application that queries the work items and then changes their states, but it seems to be pointless. What is the gain of information if you change the state automatically?

What is the gained information for the defect?

Some countries/companies block wordpress. I can't do anything about that.


sam detweiler commented Sep 10 '15, 8:02 a.m.

on the 'after two days', you will have to write some kind of scheduled job to find workitems to be changed and then change them.. you can do the first with a standard query to get the list of workitems in state A that have been there for x time.

then u have to use some external coding, java, oslc, to change the state.

2. again, don't understand that one.  sounds like you have a process problem.
you might be able to use a participant to see if the incoming state is 'In Assembly Test' with the data type of 'datawarehouse defect' and then change the state. don't think u can do this with javascript.

showing 5 of 8 show 3 more comments

Your answer


Register or to post your answer.