How to initialize the value everytime when loading a workitem ?
I'm trying to init value (calculated script based) when loading workitem. but it will always be triggered when I save workitem. I plan to have a custom attribute which has the calculated script value (System date - Due Date). I would like it change everyday when I load (open) the workitem without modification. . but the value is always the same when day passed since I don't have any modification. Any suggestion for doing this feature ?
|
3 answers
Hello Tommy,
I would use Default Provider - Script Based Default
Please refer to https://jazz.net/library/article/1003/
Hope it helps,
Eric
Comments Hi Eric :
Thanks for your response . I have tried Default value provider, but it only provide value when workitem is created.not everytime when I load the workitem. My requirement is to have a attribute which will be changed daily (system date), not only on creation time or save time, but on load (everytime when init workitem form value), any idea for that ?
As per Ralph's input,
there is not OOTB solution for that.
N Z
commented Nov 16 '14, 5:38 p.m.
Hold on a minute. What type of alert do you want?
If you just want to see items past some date, then you can easily use the dashboard for that, no need for calculated values or anything like that.
Or are you after some other sort of notification?
|
Ralph Schoon (63.6k●3●36●46)
| answered Nov 14 '14, 8:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
There is no mechanism that calculates the value of a work item just because it is loaded. The value providers work on
I quite don't get the use case either.
Comments Hi Ralph :
Customer use case is that they want to add a attribute which is "system date -due date" , called alert indicator.
When alert indicator <=3 , then display red color nearby the filed. This is reminding their users to finish their task asap.
Any other ways to fulfill their requirement ?
Correct Tommy,
sorry - for some reason - my last update was added to your comment.
I would use a js calculated attribute.
1 - overdue indicator attribute - overdue (3 values - green / orange / red)
2 - calculated value : due date - current date
I moved the comment into a comment, that is why, probably.
|
Ralph Schoon (63.6k●3●36●46)
| answered Nov 14 '14, 8:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The only viable approach I am aware of would be a custom non attribute based presentation. See https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentationsV2
Comments Hi Ralph :
I just look through the link about the ContributingAttributePresentationsV2 , I found that the "star" presentation will display based on the attribute value(true/false)
But when will the "star" show up ? When Loading workitem ? or when you just save or editing the attribute value change?
sam detweiler
commented Nov 16 '14, 8:13 p.m.
When loaded. But that IS the presentation of this attribute
Ralph Schoon
commented Nov 17 '14, 2:11 a.m.
| edited Nov 17 '14, 2:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
My assumption is, you can add a presentation e.g. based on the due date and then, when it gets loaded and the UI displays the attribute, calculate its presentation based on the attribute and the current timestamp.
|
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.