It's all about the answers!

Ask a question

Mandatory duplicate work item link if "Duplicate" resolution is selected

P. A. (1839) | asked Feb 16 '16, 1:44 p.m.

I'm working with RTC 6.0.1. I created a custom workflow and I'd like the workflow to prevent user from saving the associated workitem if "Duplicate" resolution is selected. Users will need to input the appropriate duplicate workitem link.

I've seen some related questions in this forum, but they're for older version of RTC. Also came across following enhancement request, but I'm not sure if this has been implemented in version 6.0.1

In the following thread, it's mentioned that the action is hard-coded. So, if I need that same behavior on a customized workflow, how can I work-around it? I can't just use the same workflow id on the custom workflow, right? Are there any other option?

2 answers

permanent link
Kot T. (1.5k11219) | answered Feb 16 '16, 2:47 p.m.
The above RFE 242467 is marked as duplicate of Provide duplicate link check on save for all work-item workflows (237971) and 237971 is resolved as fixed in 6.0.1. I have  not tried it in 6.0.1, but it looks like the RFE would allow flexible 'duplicate' resolution for each workflow.

P. A. commented Feb 16 '16, 4:36 p.m.

Thank you Kot for your reply. I'm fairly new to RTC. Where do you think this new configuration could be so that I can use it in my custom workflow?

Kot T. commented Feb 16 '16, 4:44 p.m.

P. A. commented Feb 23 '16, 11:42 a.m.

 Hi Kot,

Thanks for your reply. I was using RTC client version 5 and for some reason that field wasn't showing up in the client view but it was available in the web view.

Anyways, I have that field configured to use "Duplicate" resolution in my workflow. But, my workflow still doesn't force me to choose a "Duplicate Of" link. Is there another configuration I need to make somewhere else?

sam detweiler commented Feb 23 '16, 12:03 p.m. | edited Feb 23 '16, 12:24 p.m.

Notice its not 'save', it ONLY when the workitem is transitioning to  the resolved status with resolution set to Duplicate.  (or whatever you have it configured for)

I am the one that opened the original RFE. I haven't tried this on 6.0.1 yet
(read the release notes!?... nah)
works for me

I changed the resolution code to be used to trigger the check

then set it to None, and it no longer stopped the save, as expected.

P. A. commented Feb 24 '16, 12:29 p.m. | edited Feb 24 '16, 12:35 p.m.

Hi Sam,

Thanks for your reply. I have Duplicate resolution configured for a different state called "Returned". Here's an example, I created a new defect workitem, which is associated with that workflow.

<< apparently I can't upload image because my "reputation" is less than 60. sigh!! >>

Anyways, with the workitem in "New" state, I take an action called "Return" and select "Duplicate" as the resolution. Then I click on Save and the workitem saves without forcing me to add a Duplicate work item link.


Just verified what I suspected. I added "Duplicate" resolution to "Resolve" action which will move the defect to "Resolved" state. And, now I'm being forced to select a Duplicate work item link.

Unfortunately that's not my workflow requirement. I need to go to another state with "Duplicate" resolution and I need to be forced to select a duplicate work item.

sam detweiler commented Feb 24 '16, 12:34 p.m.

is Returned in one of the issue Closed state groups? or is it still open?

P. A. commented Feb 24 '16, 4:32 p.m.

 Hi sam,

In my workflow, Returned is in "Open" group and "Resolved" is in "In Progress" group. This is because work-items in these states are still not considered as Closed yet in our workflow. 

We have 2 separate states called "Closed" and "Cancelled" which are associated with Close group.

sam detweiler commented Feb 24 '16, 4:44 p.m. | edited Feb 24 '16, 4:45 p.m.

yep, my guess is that the code gets the states in the Closed group, and then checks to see if the new state is in that list. (My code for checking the Depends On link does the same thing, but it only matters if you try to close this one, if that one is not yet closed)

you could prove this is the case, temporarily by putting Returned into the closed group and trying the save duplicate

showing 5 of 8 show 3 more comments

permanent link
P. A. (1839) | answered Mar 09 '16, 9:57 a.m.
 Hi sam,

Finally I have this figured out (i think), but it does not make any sense. I went through the workflow debugging with another colleague who is more familiar with it than I am. We tried a lot of trial and error.

The state group doesn't seem to have any impact. Even if Returned is in closed state group, the work item still would not force user to select a duplicate work item link when transitioning to Returned state with "Duplicate" as the answer.

What worked? Well... Added "Duplicate" resolution to "Resolve" Action. Previously, I only had one resolution ("Fixed") under Resolve action as per our workflow process. Now Resolve action has 2 resolution (Fixed, Duplicate) and Resolved state is in "In Progress" state group.

Having that change, now Selecting "Duplicate" resolution from ANY action (i.e. Return, Cancell, etc.) forces users to select "Duplicate" work item link. Does this make sense? 

Your answer

Register or to post your answer.