It's all about the answers!

Ask a question

Capturing the timestamp on when filed against is last assigned.

Ashwath G (6623951) | asked Aug 06 '15, 6:21 a.m.
edited Aug 06 '15, 6:22 a.m.

We have a requirement to implement that If a defect is moving from one team to the other, we need to capture the time stamp of when the defect was assigned to the last Development team.

Meaning time stamp need to be captured when last assignment or change on "Filed Against" value.

Is this is possible to achieve using script.

Kindly advise. Thank You....!


One answer

permanent link
Ralph Schoon (63.2k33646) | answered Aug 06 '15, 8:25 a.m.
edited Aug 06 '15, 8:28 a.m.
You can try a calculated value calculating the date and storing it in an attribute. The calculated value would only have the attribute filed against as dependency.
I am not sure if that would work.

More complex would be to store the current filed against value in an attribute using a calculated value that has a dependency to the filed against attribute and only update that attribute if there is a change. Then have the date calculated from this attribute.

JavaScript is not really good in tracking changes like that, because you get the current value and don't know the old one. But you can trick your way along sometimes. I don't find it really elegant.

You could use a work item save follow up action, but the programming model is obviously harder.

Ashwath G commented Aug 18 '15, 3:30 a.m.

Hello Ralph,

Thanks for the inputs. So here you are referring to server side plugin program in order to achieve this?
Even i have tried one more requirement similar like ReAssigning counter...where when ever owner is changed ,counter should increase by 1. I have wrote two scripts first to capture the first assignee into hidden assignee variable to an attribute. And then reading owned by value into other variable using other script and also getting hidden assignee attribute value captured using script1 to compare. But when ever first assignee is changed from A to B both hidden assignee and owed by will have same value since its reading from same attribute other way around workItem.getValue(WorkItemAttributes.OWNER);
Script could not hold first assignee value to some temp var at all.

So for this also a server side plugin program is suitable?

Looking for your valuable inputs.

Thank Again...!


Your answer

Register or 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.