I comment a jira as follows:
hi @Lily @[deleted] it's a lovely day, isn't it?
I want to use jira automation to add lily and tom as the watchers, but don't know how to fulfill this. Could any guy help?
Thanks,
Craig
Hi @Craig
Until that suggestion is implemented, you could built this functionality yourself using Automation for Jira. For example:
To learn more about automation rules, please see this documentation and examples:
Kind regards,Bill
https://jira.atlassian.com/browse/JSWCLOUD-21006
Hey @Bill Sheboy - I'm a newbie to variable writing - do you have an example of what the action would look like here? We're trying to achieve the same thing
Hi @Kit Friend
Here are more details on what I described to extract the account id values from the comments...
{{issue.comments.last.body.replace("[~accountid"," [~accountid").split(" ").match("(accountid:.*)]").remove("accountid:")}}
UPDATED 2023-Feb-06: I updated the expression for varAddWatcher to split on spaces before searching for the accountId values.
UPDATED 2023-Jun-15: In the unlikely case there is no leading space between mentions, I updated the smart value expression to add a space before mentions and then split on them.
Thanks @Bill Sheboy really kind of you!
Hey @Bill Sheboy Im using this code now:{{issue.comments.last.body.split(" ").match("(accountid:.*)]").remove("accountid:")}}and when I tag multiple users its doesn't make them watcher, only when I tag only one.do you know what i need to change in the code or in the automation that it will fix it?
Hi @Omri Zeman
Please see my response to your own question on this scenario as it requires using an advanced branch:
https://community.atlassian.com/t5/Jira-questions/Re-Auto-Add-Watchers-When-Mentioned-in-the-comment-problem/qaq-p/2908107/comment-id/1078651#M1078651
It looks like you're new here. Sign in or register to get started.