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.
Using Script Runner:
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)
You can add watchers on the server version
By More - Watchers - Add existing users' names as watchers
Not on create screen but edit screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Install the JIRA Watcher Field for Jira app from the Atlassian Marketplace
https://confluence.atlassian.com/jirakb/add-watchers-in-the-issue-creation-screen-315327528.html
Thanks,
Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.