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

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

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

0 votes



One answer

Permanent link
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..

1 vote

Comments

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

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.

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?

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.

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

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.

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 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
× 6,125

Question asked: Sep 10 '15, 6:44 a.m.

Question was seen: 2,197 times

Last updated: Sep 10 '15, 8:02 a.m.

Confirmation Cancel Confirm