Is there any way to add Watchers on issue creation in Jira version 7.13.5 or above?

Deleted user November 4, 2019

Hi,

Is it possible to add to the Watchers list when creating an issue? I would find it very helpful to assign the ticket to a user and then add Watchers in the create issue step.

4 answers

1 vote
Kántor Tibor
Contributor
September 5, 2022

Using Script Runner:

  1. Add a custom multi user picker field, eg.  "Watcher users"
  2. Add it to your screen
  3. Set the following post function on the create transition, after all the steps:
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.event.type.EventDispatchOption

def
loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def watcherManager = ComponentAccessor.getWatcherManager()
def wU = customFieldManager.getCustomFieldObjectsByName("Watcher users")
def watchUsers = issue.getCustomFieldValue(wU[0])

//add each user to watchers list
watchUsers.each {
    //extract user key from custom user multiselect field, if field value format is user(user)
    String subStringUser = "$it".substring("$it".indexOf("(")+1,"$it".indexOf(")"))
    ApplicationUser watcher = ComponentAccessor.getUserManager().getUserByKey(subStringUser)
    watcherManager.startWatching(watcher, issue)
 }

//clean up custom field so that it won't show up unnecessarily after create

issue.setCustomFieldValue(wU[0], null)
ComponentAccessor.getIssueManager().updateIssue(loggedInUser, issue, EventDispatchOption.ISSUE_UPDATED, false)

 

0 votes
Zoey Wang May 16, 2022

You can add watchers on the server version 

  • v8.20.6

By More - Watchers - Add existing users' names as watchers

 

Not on create screen but edit screen.

0 votes
Deleted user October 15, 2021

We use a private instance of Atlassian Jira version 8.13.4. I know two ways to add watchers:

1) When I create a story, the Create dialog that is shown on my Jira instance includes a field "Watchers" where I can add as many users as I like. But I don't know if there is special configuration or magic plugins behind the scenes to get the Watchers field, I'm not the site admin.

2) Alternately, to add the same watcher(s) automatically to every newly created issue, go to project settings, then project automation.  Once there, you create a new rule with the following conditions:


Trigger: Issue Created
New Action: Manage Watchers (and then add the users you want to be watchers)

Then you just name your rule and turn it on.

Alexander Tynetalo July 18, 2022

Hi @[deleted]
Could you ask your Jira Administrator about field Watchers you have described above?
Or just look at Creation Screen for that Issue Type in your Project configuration (Project Configuration - Screens - look for Create Screen) and check for Watchers field type
I suppose it's just standard User Picker Field, and your Jira Administrators have added automation which take users from this field after issue creation and add them as watchers to the issue

Chris Lott
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!
July 20, 2022

@Alexander TynetaloI checked Project Settings, Screens, "Agile Scrum Create Screen, v2" where the Watcher field type is listed simply as "Watcher Field". Sorry I realize that's not very helpful. That screen uses a template which is shared across hundreds of projects, so I only have read access.

0 votes
Avinash Bhagawati {Appfire}
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 4, 2019

HI @[deleted] ,

Currently you can not add watcher to create issue screen and already improvement request wis Atlassian. Please vote or watch below ticket further updates on ticker.

https://jira.atlassian.com/browse/JRASERVER-5493

As a workaround you can follow below steps.

  1. Install the JIRA Watcher Field for Jira app from the Atlassian Marketplace

  2. Under Administration > Issues > Fields > Custom Fields, create a new field:
    1. Type = Watcher Field, Name = Watchers, Description = (eg) "Watchers are notified on issue changes", Search template = Watcher Search, Issue Type = Any, Context =Global
  3. Click the screens link for the new field and add it to the appropriate screen associated with issue creation.
  4. In the Administration > Issues > Screens section, you can set the position of the watchers field for screens you have added it to.
  5. Perform a re-index.

https://confluence.atlassian.com/jirakb/add-watchers-in-the-issue-creation-screen-315327528.html

Thanks,

Avinash 

Stefan
Contributor
January 4, 2022

Those links doesn't seem to work anymore. I also can't find the "Watcher field" on the marketplace.

We are using Jira Server 8.16.0. Maybe it is already in this version included? But I can't find the watcher field, when I create an issue.

Regards
Stefan

Like Gavin Farrington likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events