/
Copy the reporter and watchers on duplicate issues
Copy the reporter and watchers on duplicate issues
Problem
You want to copy the watchers and the reporter from the original issue when developers close an issue with a resolution duplicate.
Solution
Write the code
Enter the following SIL™ code.
string u;
number n=0;
n=size(fieldHistory(key, "Link"));
if (n>0 and resolution=="Duplicate")
{
string dKey=getElement(fieldHistory(key, "Link"),n - 1); // history
%dKey%.watchers=addElementIfNotExist(%dKey%.watchers, reporter);
for (u in watchers)
{
%dKey%.watchers=addElementIfNotExist(%dKey%.watchers, u);
}
}
Next, add this code to the post function on the Resolve issue transition.
- 1 Problem
- 2 Solution
- 2.1 Write the code
, multiple selections available,
Related content
Copy the reporter and watchers on duplicate issues
Copy the reporter and watchers on duplicate issues
More like this
Copy watchers to sub-tasks
Copy watchers to sub-tasks
Read with this
Reporter history panel
Reporter history panel
More like this
Copy data from the parent issue
Copy data from the parent issue
Read with this
cloneIssue
cloneIssue
More like this
Reopen issue when new Bug is linked
Reopen issue when new Bug is linked
More like this