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

Is there a way to get the work item state date?

I know there is a way to retrieve the succession of states from the work item history, (https://jazz.net/forum/questions/149321/some-questions-about-reportable-rest-api)
but so far I managed to get only the state name.
Can I get the state date?
By that I mean the date at which an work item changed from "New" to "In progress".
I am not limited to the REST api.

Thank you

0 votes


Accepted answer

Permanent link
You can refer to the REST API for more details(https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI)  on what properties can be used in your query in addition to the post you referred to to get the state name. For example, if I add [dayModified] to retrieve workitem 106's history for state as below, it will give me the day modified info:

https://localhost:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id='106']/(itemHistory/(state/name|dayModified))
Matei Florescu selected this answer as the correct answer

0 votes

Comments

This helped, I had to modify the query a little:

fields=workitem/workItem[id=...]/(id|summary|itemHistory/dayModified|itemHistory/state/name)

Result is:

    <workItem>
        <id>...</id>
        <summary>...</summary>
        <itemHistory>
            <dayModified>...</dayModified>
            <state>
                <name>Resolved</name>
            </state>
        </itemHistory>
        <itemHistory>
        ...
       


2 other answers

Permanent link
If you're facile with Java, look at the JavaDoc of the Plain Java client libraries for IAuditableHandle.

public interface IAuditableHandle
extends IManagedItemHandle
	
Represents an auditable item. Auditable items exist in multiple states in a repository. There is a global notion of the current state of an auditable item; states other than the current are used for an audit trail.

Item handles and items can only be created or retrieved from a repository while the client is logged in. When the client logs out, all objects that they obtained while logged in must be considered invalid. It is unspecified whether these objects come back to life, so to speak, if the client logs back in.

I've used this to good effect to tease out the change date of a specific attribute so that the date can be used to answer before/after sort of question.


This post has a small bit of Java that got me started.



0 votes


Permanent link
You could create a timestamp attribute to get the date when the workitem got to that state using calculated values scripts. And then query that field.

0 votes

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
× 10,994
× 482

Question asked: May 28 '15, 5:00 a.m.

Question was seen: 5,189 times

Last updated: May 31 '15, 7:13 a.m.

Confirmation Cancel Confirm