Skip to end of banner
Go to start of banner

Recipe - Copy the reporter and watchers on duplicate issues

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Copy the reporter and watchers on duplicate issues

On this page:

Yet another small trick to make your user's life bearable: when developers close an issue with resolution duplicate, you should normally copy the watchers and the reporter to the original issue.

Writing the code

This is done in SIL in the following way:

 

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);
 }
}

 

You just need to put this on the postfunction on the transition 'Resolve issue' and that's all.

  • No labels