How can we make an RTC script (Js/Dojo) run periodically and let it set a specific attribute value directly (with out need to open a work item, change a specific value and save it)?
I have a script which gets the difference between Current Date and Due Date. The script returns the number of days and it only runs if the Due Date has changed manually in the work item.
|
Accepted answer
Ralph Schoon (63.6k●3●36●46)
| answered Nov 27 '17, 5:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Basically you can't and you also should not even try.
Geoffrey Clemm selected this answer as the correct answer
Comments
Abdelrahman Hassan
commented Nov 27 '17, 4:56 p.m.
Ralph - Thank you for your comment. I will take care of the question guideline in the future.
Abdelrahman Hassan
commented Nov 27 '17, 4:58 p.m.
Please find the script below:
Abdelrahman Hassan
commented Nov 27 '17, 5:07 p.m.
try {
Ralph Schoon
commented Nov 27 '17, 11:30 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You still talk about an implementation and not the requirement which is to be able to report and query the work items status with respect to being over due.
A calculated value is not the best solution for this and certainly not if you calculate it every night.
You should create work item queries or reports to show the work items that are over due there is also a due date notifier https://rsjazz.wordpress.com/2015/10/16/due-date-notifier-an-asynchronous-task-example/ .
Abdelrahman Hassan
commented Nov 28 '17, 2:02 a.m.
Ok, thank you for your help.
Ralph Schoon
commented Nov 28 '17, 2:24 a.m.
| edited Nov 28 '17, 7:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Sorry, no time today to spend on this. Look into reporting and work item queries if you can create reports/queries for this work item. Unfortunately there is no way to implement an attribute that is always calculated when the work item is accessed by a report or query.
showing 5 of 6
show 1 more comments
|
One other answer
I suggest to use client side extension to calculate the difference and export it as a runnable jar file then run it using a windows task scheduler everyday @12 am.
Comments I suggest to not do something like that if there are no really good reasons. It is likely that this is just a very messy solution for some business problem that should be solved otherwise. You simply don't automatically update a date attribute every day, period.
Abdelrahman Hassan
commented Nov 27 '17, 5:04 p.m.
Bahaddin - Thank you for your help, much appreciated.
|
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.