How to notify Project Lead about changing of every issue in project?
I need to notify Project Lead about all changes of any issue in his Project.
So I wrote worflow rule to add Project Lead as a watcher, but Project Lead don`t get any notification.
Than I tried to send notification directly like this
But I didn`t find any way to form notification_string automatically. As I got I need to form custom notification_string for every updates by myself.
How can I notify Project Lead automatically about any issues changes with automatically notification_string generation?
So I wrote worflow rule to add Project Lead as a watcher, but Project Lead don`t get any notification.
rule Add_Watcher_ProjectAdmin_permanently
when issue.updated {
issue.applyCommand("add watcher " + project.leader.login);
}
Than I tried to send notification directly like this
rule Notify_ProjectAdmin_about_any_changes
when issue.updated {
project.leader.notify( "notification_string" );
}
But I didn`t find any way to form notification_string automatically. As I got I need to form custom notification_string for every updates by myself.
How can I notify Project Lead automatically about any issues changes with automatically notification_string generation?
Please sign in to leave a comment.
Couple words about the workflow. The mуthod project.leader.notify("title", "text"); needs 2 parameters: the letter summary and text.
To track all issue changed you have to leave condition block empty and track particular change inside the workflow:
rule change when <issue created or updated> { var msg = ""; if (Priority.changed) { if (msg.isNotEmpty) { msg = msg + "\n"; } msg = msg + "Priority changed from " + Priority.oldValue + " to " + Priority; } if (Type.changed) { if (msg.isNotEmpty) { msg = msg + "\n"; } msg = msg + "Type changed from " + Type.oldValue + " to " + Type; } for each comment in comments.added { if (msg.isNotEmpty) { msg = msg + "\n"; } msg = msg + "Comment added: " + comment.text; } project.leader.notify("Issue " + getId() + " has beed changed", msg); }