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

Automatic Assignment of "approver" in Child Work item

 Hi,

I have two work items with Parent - Child Relationship.

In Parent Work item i have created Two roles (for approval) of type contributor.

Now when Child work item goes at particular state, then the approvals should be added automatically. Approvers gets added automatically when the value of the roles are different in Parent Work item.

If value of the roles in parent Work item are same, then only single approver should get added in the child.
How is it possible to do with precondition?

I have tried doing it with precondition but it throws an exception saying 
 "An unhandled exception occurred: Approval descriptor already has an approval with the same approver"


Thanks in Advance.

Regards,
Amit

0 votes


Accepted answer

Permanent link
Now when my Child Work item is in "In Progress" state it throws an exception as
"An unhandled exception occurred: Approval descriptor already has an approval with the same approver"

This exception indicates that you are trying to add the same approver a second time to an approval. You have to fix your code and check for approvers that are already added and only add the new ones.
Ralph Schoon selected this answer as the correct answer

0 votes


3 other answers

Permanent link
 Amit, please see http://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ http://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ , http://rsjazz.wordpress.com/2012/12/14/do-not-modify-the-triggering-element-in-an-operationadvisor/ and other posts on the blog.

0 votes


Permanent link
 Hi Ralph,
I have gone through these links, i am able to add approvers automatically but for one scenario it throws and exception. 
Let me explain you in Detail:

Case 1
In Parent Work Item:

Reviewer1  : Amit
Reviewer2 :  Ralph 

In Child : 
At particular state say "In Progress" both the reviewers gets added automatically in approver section of my child work item

Case 2 :
In Parent Work Item

Reviewer1  : Amit
Reviewer2  : Amit

Now when my Child Work item is in "In Progress" state it throws an exception as
"An unhandled exception occurred: Approval descriptor already has an approval with the same approver"

How can i cater to this exception?

Regards,
Amit 

0 votes

Comments

I would assume your participant triggers in the other state as well and tries to add the same approved again. I would debug if this is the case and potentially check if an approval and the approves is already there before trying to add it. 


Permanent link

Amit,

I see you have some similar problem as me or you can help me.
I have few type of WI and on the end when user will choose some kind of one and after save some defined person will be added as approves, im not able to add this option i can add only subscribers automatically but have problem with approves  

Amit, Ralph
can you help me im really new in managing Jazz ?

0 votes

Comments
  1. Stop adding answers to existing questions as new question, create your own question
  2. As answered in https://jazz.net/forum/questions/248331/how-do-i-automatically-add-approvals-to-newly-created-work-items and discussed here, you need a follow up action to do anything like this in linked work items. see the answer to your question https://jazz.net/forum/questions/248331/how-do-i-automatically-add-approvals-to-newly-created-work-items

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
× 10,937

Question asked: Mar 16 '13, 3:37 a.m.

Question was seen: 6,054 times

Last updated: Jan 04 '18, 5:20 a.m.

Confirmation Cancel Confirm