How to set an attribute based on the time WI is loaded?
Hi guys,
I created an attribute and I would like to fullfill it with the time that workitem is loaded using "Script Based Vale Set". Does anybody knows if is it possible?
When we open, update or refresh the workitem, the information of the time that the WI is loaded appears in the page as presented below:
Can I use this information in my script? Maybe some internal field can return this information....any ideas?
Since now, thanks for any tip.
Luiz Cesar.
|
Accepted answer
Geoffrey Clemm (30.1k●3●30●35)
| answered Nov 22 '17, 4:19 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER I believe you are thinking of a "script-based calculated value", not a "script-based value set. But that doesn't help, because changes to the calculated value are triggered by a save of the work item, not by a "load" of the work item (I assume by "load", you mean when the work item is retrieved from the server via a GET call).
And you shouldn't try to do this anyway, because that would result in a write to the database for ever work item that is read from the server, which would flood the database with write transactions.
What is the use case you are trying to address? Perhaps there is a more reasonable way of achieving it.
Luiz Almeida selected this answer as the correct answer
Comments
Luiz Almeida
commented Dec 18 '17, 2:45 p.m.
Geoffrey,
|
One other answer
Ralph Schoon (63.3k●3●36●46)
| answered Dec 18 '17, 3:13 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Dec 18 '17, 3:16 p.m. Did you even read the answer? An attribute customization using what the basic JavaScript attribute customization allows will NOT work.
Comments
Guido Schneider
commented Dec 18 '17, 4:35 p.m.
BTW, this should also be possible with Report Builder, if you like to have a report showing how long a Work Item was in a particular state.
|
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.