Is there anyone who can give me a script behavior or listener runner which can set auto-watchers?

Jason Liu March 13, 2022

Hi, I want to have a runner which can set auto-watchers. In one project, several users could be automatically added as watchers to certain kind of issue type, such as "Bug". Could anyone help? Thank you in advance.

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2022

Hi @Jason Liu ,

A firtst option is to use https://marketplace.atlassian.com/apps/1215460/automation-for-jira-data-center-and-server?tab=overview&hosting=server free app provided by Atlassian. Based on issue event and issue type you can add watchers as single users or as a group.

Another option is to use JSU app (https://marketplace.atlassian.com/apps/5048/jsu-automation-suite-for-jira-workflows?hosting=server&tab=overview) and, in particular, Update Any issue field post function.

Add that post function on creation related Bug workflow and select Watchers field.

This should fix your issue. 

Hope this helps,

Fabio

Jason Liu March 14, 2022

Hi Fabio, I tried JSU update any issue field or copy value from other field, and it showed error when I tried to create an issue. It's "We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file."

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2022

Hi @Jason Liu ,

error probably is related to uncorrect value set in JSU post function. Please share your current setup.

BTW, my suggestion is to setup an automation.

Jason Liu March 14, 2022

I configured a field "designer" and used Copy Value From Other Field (JSU) to copy designer to watchers. Precondition must be: Ignore precondition. Issue Relation:
Within same Issue. and append. 

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2022

Please Designer is a custom field so we need to know the custom field type.

Jason Liu March 14, 2022

Hi Fabio, I was reminded by you about the custom field type and checked that designer was user picker (single user). But I tried to change it to another custom field owner which is user picker (multiple users) and it also showed that error code.

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2022

Hi @Jason Liu ,

it is strange because it should work. Did u setup overwrite,append or prepend?

Jason Liu March 15, 2022

I used append.

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2022

Hi @Jason Liu ,

I just tested it in a my local environment and it worked like a charm.

jsu.png

Please could you share a screenshot of your post functions like the the above one?

Jason Liu March 15, 2022

Hi Fabio, Please see the screen shot.

微信截图_20220315165302.png

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2022

is this a create transition? Please could you provide all the other post function for the transition (2,3,4...)?

Jason Liu March 15, 2022

Screenshot 2022-03-15 165911.png

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2022

Please move your post function after "Creates the issue originally". It will fix your issue.

Ciao,

Fabio

Jason Liu March 15, 2022

Hi Fabio, It's grey and cannot be deleted.微信截图_20220315170939.png

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2022

You should move down the first one. Create the issue originally should not be deleted but moved in first position.

jsu.png

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2022

@Jason Liu , did u try?

Jason Liu March 15, 2022

Hi Fabio, I did and it worked. No error now and I could create the issue. Thank you so much.

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 16, 2022

you're welcome @Jason Liu 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events