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.
This will look like the attached image
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
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
Thanks @Rambabu Patina {Appfire}
I have learnt something new today.
@[deleted]
Thank you, the workaround given in the feature request comments worked for me.
@Rambabu Patina {Appfire}
Thank you, however not available for Cloud version
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
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 userdef userManager = ComponentAccessor.getUserManager()MutableIssue issue = issue as MutableIssuedef 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"
Prerequisites: ScriptRunner app from Atlassian MarketPlace
@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.
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
now it is possible to set it up very easily with Jira automation
Hello Judit, could you kindly take us through the steps? I, somehow, cannot seem to find the "Add watchers" action within Automation tab.
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.
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
Please accept answer if it solves your query.
It looks like you're new here. Sign in or register to get started.