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

How to get Modified Date attribute of a work Item

Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika

0 votes



11 answers

Permanent link
Assuming you talk about the JAVA API, did you try the method .modified() ?

0 votes


Permanent link
Hi Krutika

Do you have a solution for this? Were you able to get the modified date on a state change? If yes please share.

Thanks in advance.

Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika

0 votes


Permanent link
Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika


As far as I am aware the work item only tracks the last modification accessible with the modified() method. If you want specifics on when a state changed etc, you would either have to get the history and analyze it, or you would have to try to go through the state history and analyze it. I haven't tried that myself, so I am not sure how to approach it.

0 votes


Permanent link
Hi,

We can achieve this by adding a new field in project and create Operation Advsior plugin using plain JAVA which will capture the Current date Time and save it to this Last Modified field...

You can update this field on every save or you can update this field only on status change.



Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika

0 votes


Permanent link
Hi,

We can achieve this by adding a new field in project and create Operation Advsior plugin using plain JAVA which will capture the Current date Time and save it to this Last Modified field...

You can update this field on every save or you can update this field only on status change.


Nice idea, thanks for sharing.

0 votes


Permanent link
Hi Muthukumar

Yes I am trying to implement the same. I have a new field attribute created and i have placed an attribute customization script in this field. the script is trying to get the modified date timestamp in which the state of 'Review' Work Item type is changed from New to Ready For Review. But I am not getting any value in the attribute field as expected.

Can you please explain on how to make this work? What is Operation Advsior plugin?

Thanks
Gayathri



Hi,

We can achieve this by adding a new field in project and create Operation Advsior plugin using plain JAVA which will capture the Current date Time and save it to this Last Modified field...

You can update this field on every save or you can update this field only on status change.



Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika

0 votes


Permanent link
Hi Gayathri,

Plug-in is nothing but the JAVA version of what you are doing in the JS.

Go through this link and understand the concept behind it.

https://www.ibm.com/developerworks/mydeveloperworks/blogs/extendingrtc/entry/checksummaryadvisor?lang=en_us

following the same method, we can update and modify any fields

Regards
Muthukumar.C

Hi Muthukumar

Yes I am trying to implement the same. I have a new field attribute created and i have placed an attribute customization script in this field. the script is trying to get the modified date timestamp in which the state of 'Review' Work Item type is changed from New to Ready For Review. But I am not getting any value in the attribute field as expected.

Can you please explain on how to make this work? What is Operation Advsior plugin?

Thanks
Gayathri



Hi,

We can achieve this by adding a new field in project and create Operation Advsior plugin using plain JAVA which will capture the Current date Time and save it to this Last Modified field...

You can update this field on every save or you can update this field only on status change.



Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika

0 votes


Permanent link
I would also recommend

https://jazz.net/library/article/784

and especially

https://jazz.net/library/article/634

0 votes


Permanent link
Hi,

I have fetched the modified date using script but i'm not able to set that value to another custom attribute of type Timestamp. Its not throwing any error in log file also.
Since the modified date and my custom attribute is of same type, I'm fetching the modified value and passing to custom attribute but I'm not able to see the value in custom attribute. Do we have to convert the modified date value and return it as a timestamp or string??
could anyone share your thoughts on this....

Below is the code i'm using

// JavaScript Document


dojo.provide("com.example.dateCalculationValueProvider");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
dojo.require("dojo.date.stamp");

(function() {

var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

dojo.declare("com.example.dateCalculationValueProvider", null, {

getValue: function(attribute, workItem, configuration) {

//Get Status value
var Status = workItem.getValue(com.ibm.team.workitem.api.common.WorkItemAttributes.STATE);
console.log("State value is "+Status);

var ModifiedDate = dojo.date.stamp.fromISOString(workItem.getValue(com.ibm.team.workitem.api.common.WorkItemAttributes.MODIFIED));
console.log("Modified Date is " +ModifiedDate);

if ((Status = "com.ibm.team.apt.storyWorkflow.state.s15")) {//literal value for "Ready to Implement" from process source config..

var result = ModifiedDate;
return result
}
}
});
})();


Hi Krutika

Do you have a solution for this? Were you able to get the modified date on a state change? If yes please share.

Thanks in advance.

Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika

									

0 votes


Permanent link
Hi,

I am not sure about the JS syntax. In java we have to use java.sql.TimeStamp data type.

Hi,

I have fetched the modified date using script but i'm not able to set that value to another custom attribute of type Timestamp. Its not throwing any error in log file also.
Since the modified date and my custom attribute is of same type, I'm fetching the modified value and passing to custom attribute but I'm not able to see the value in custom attribute. Do we have to convert the modified date value and return it as a timestamp or string??
could anyone share your thoughts on this....

Below is the code i'm using

// JavaScript Document


dojo.provide("com.example.dateCalculationValueProvider");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
dojo.require("dojo.date.stamp");

(function() {

var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

dojo.declare("com.example.dateCalculationValueProvider", null, {

getValue: function(attribute, workItem, configuration) {

//Get Status value
var Status = workItem.getValue(com.ibm.team.workitem.api.common.WorkItemAttributes.STATE);
console.log("State value is "+Status);

var ModifiedDate = dojo.date.stamp.fromISOString(workItem.getValue(com.ibm.team.workitem.api.common.WorkItemAttributes.MODIFIED));
console.log("Modified Date is " +ModifiedDate);

if ((Status = "com.ibm.team.apt.storyWorkflow.state.s15")) {//literal value for "Ready to Implement" from process source config..

var result = ModifiedDate;
return result
}
}
});
})();


Hi Krutika

Do you have a solution for this? Were you able to get the modified date on a state change? If yes please share.

Thanks in advance.

Hi,

How can we get Modified Date of any workitem with respect to state change (From New to In- progress etc.)??
there is a predefined method to get Due Date.
How to get Modified Date?

Thanks,
Kruttika

									

0 votes

1–15 items
page 1of 1 pagesof 2 pages

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,938

Question asked: Dec 01 '11, 2:18 a.m.

Question was seen: 13,650 times

Last updated: Dec 01 '11, 2:18 a.m.

Confirmation Cancel Confirm