How do I automatically add a user as a watcher for an issue-type when a ticket is created?

Mario Garces May 18, 2018

I want a particular user to be automatically added as a watcher for a specific issue-type when a ticket is created in that project.  I am using the Cloud version of JIRA.

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2022
 
We can now add a particular user to watchers list  for a specific issue-type in a project. Please follow below steps to do it.
 
  • Go to Project settings --> Automation --> Create new
  • Select below details 
    •  When: Issue created
    • New condition: JQL Condition (add the required JQL. Example: Issue type = "Service Request")
    • New Action: select Manage Watchers
      under "Add these watchers", add the required user. 
    • Save

This will look like the attached image

image.png

fulya February 22, 2022

Thanks for the reply, though I cannot quite figure how to work with JQL... Is it possible to create the rule without a condition since I do want this rule to apply for the whole board whatsoever.

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2022

Hi @fulya

JQL is for filtering out tickets. You can even continue with When(issue created) and Then (New action -->Add watchers) only.

Automation rule will run for all tickets created in the project irrespective of the issue/ticket types

image.png

 

Please accept answer if it solves your query. 

fulya February 22, 2022

Ekran Resmi 2022-02-22 16.29.35.png

fulya February 22, 2022

Hi again, you could kindly see my screen above. Therefore, it seems like that I don't have the aforementioned action here.  

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2022

Hi @fulya 

Try searching with "Manage Watcher" or just "watcher" in components section.
Instead of search, you can just scroll down to check what all options are present. 

image.png


Like fulya likes this
fulya February 23, 2022

I cannot believe that I gave you this much trouble for such an easy application... Thanks for your time and effort you spent explaining to me! 

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 24, 2022

Hi @fulya ,
Please accept the answer if it has helped you find the solution. 

fulya February 24, 2022

Sorry, I am not the owner of this question. Therefore I guess I am not the one to accept as an answer. Though I gave a vote to your answer, is this sufficient for you?

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 24, 2022

Thank you. 
image.png

1 vote
Vinay Shekar S February 28, 2020

This can be achieved by adding custom script postfunction on "Create Issue" workflow transition.

Follow below steps:

1. Add a Post function

2. Select "Script Post-Function [ScriptRunner]"

3. Select "Custom script post-function"

4. Add below code

========================================

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.MutableIssue


def userName = "username" // name of the user
def userManager = ComponentAccessor.getUserManager()
MutableIssue issue = issue as MutableIssue
def user = userManager.getUserByName(userName)

def watcherManager = ComponentAccessor.getWatcherManager()

watcherManager.startWatching(user, issue)

=========================================

5. Don't forget to move this postfunction below "Creates the issue originally"

PrerequisitesScriptRunner app from Atlassian MarketPlace

Maria Redlin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 4, 2020

Hi Vinay,

I have done so, but I get an error message on line 7 . Variable "Issue" makes a binding variable of the same name.

Please advice

Maria

0 votes
Firas Amer
Contributor
February 14, 2022

now it is possible to set it up very easily with Jira automation

fulya February 21, 2022

Hello Judit, could you kindly take us through the steps? I, somehow, cannot seem to find the "Add watchers" action within Automation tab.

0 votes
Rambabu Patina _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 18, 2018

Using  Update On Transition add-on you can set up a post function to automatically add watcher. For similar examples see https://bobswift.atlassian.net/wiki/spaces/CW/pages/55050519/How+to+update+issues+after+initial+issue+create

Deleted user May 18, 2018

Thanks @Rambabu Patina _Appfire_ 

I have learnt something new today. :)

Mario Garces May 18, 2018

@Rambabu Patina _Appfire_

Thank you, however not available for Cloud version

0 votes
Deleted user May 18, 2018

Hi @Mario Garces,

You may need to investigate the Script Runner plugin and build a custom script to do this, as a similar question was created with regards to your request.

There is also a feature request on Atlassian's JIRA, you may want to vote on this issue. 

Hope this helps

Mario Garces May 18, 2018

@[deleted]

Thank you, the workaround given in the feature request comments worked for me.

Corey_Tabb
Contributor
December 6, 2019

This is pretty shit service every time there is a feature that loads of people want a ticket is created people have to upvote it people upvote it and then it is never added what is the point in telling us to vote for a feature if you are never ever going to do it what feature has the public requested that you ACTUALLY ADDED i am yet to see one added that isn't oww go to this plugin and pay even tho you already pay thousands a month for us

Like # people like this
Steve McG
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2020

@Corey_Tabb totally agree. Most times I look for some help on a piece of functionality with Jira the answer seems to be from someone trying to sell their add-on through the marketplace ($$$), or you have to vote for it to be added. I mean, how long do we have to wait for all the votes to be counted... It comes across as "yeah, we're not going to do that, sorry bud".

Looks like Atlassian are getting their functionality gaps filled by the marketplace and probably getting a nice little cut on the way.

Like # people like this

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question