How can I create a field with number of time a work item is "rejected' - Rational Team Concert
I created a custom work item called demand.
This work Item have a custom workflow (demandWorkflow)
I want the field "Reject count" to display the number of times the work item is changed to the status of Rejected
(One demand can be rejected over and over again and change back to reopen), it was requested to have a field that counts how many times the work item was rejected.
Thanks in advance.
This work Item have a custom workflow (demandWorkflow)
I want the field "Reject count" to display the number of times the work item is changed to the status of Rejected
(One demand can be rejected over and over again and change back to reopen), it was requested to have a field that counts how many times the work item was rejected.
Thanks in advance.
2 answers
You may consider attribute customization with a calculated value, something similar to this post.
https://jazz.net/forum/questions/89093/calculated-value-script-error-in-rtc-error-invoking-value-provider
Some more reading on this topic.
https://jazz.net/library/article/1003
https://jazz.net/wiki/bin/view/Main/AttributeCustomization
https://jazz.net/library/article/1360
https://jazz.net/forum/questions/89093/calculated-value-script-error-in-rtc-error-invoking-value-provider
Some more reading on this topic.
https://jazz.net/library/article/1003
https://jazz.net/wiki/bin/view/Main/AttributeCustomization
https://jazz.net/library/article/1360
I can't have a check for the state?
if state.value == "rejected"
count++
I don't care for the previous state, neither if the next stage will be reopen or close, I just want to count how many times the work item is rejected by user.
Thanks for the reply anyway, any help is appreciated
if state.value == "rejected"
count++
I don't care for the previous state, neither if the next stage will be reopen or close, I just want to count how many times the work item is rejected by user.
Thanks for the reply anyway, any help is appreciated
Comments
If rejected is a state, if they change the workitem (owner, comment, description, approvals, ... anything other than a NEW state) WHILE it is in that state, then your counter will be increased incorrectly.. (been there already!
the script fires on every save
it was easy to do in Java.. but you have to put something on the server disk and restart the server..