Versions Compared
Version | Old Version 3 | New Version 13 |
---|---|---|
Changes made by | ||
Saved on |
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Table of Contents |
---|
Info | ||
---|---|---|
| ||
Power Scripts™ for Jira (server) Level: BASIC |
Problem
...
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.
Code Block |
---|
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.
Table of Contents |
---|