Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



2 answers

Permanent link
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

0 votes

Comments

Unfortunately you can't do this in a scripts because scripts cannot get the prior state. And I don't think they can get the action either. 


Permanent link
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

0 votes

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

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121

Question asked: Sep 11 '14, 6:03 p.m.

Question was seen: 4,943 times

Last updated: Sep 12 '14, 12:59 p.m.

Confirmation Cancel Confirm