Is there any possible way I can create an issue same time adding watchers using the emails of the users?
I could separately add watchers using the userId but I want it using the user email.
I have tried this: https://community.atlassian.com/t5/Answers-Developer-Questions/JIRA-REST-API-create-ticket-with-watchers/qaq-p/495635
and many methods but didn't help!
Thanks in advance.
Hi Nadun,
Apparently on Jira Cloud doesn't have that feature that will enable you to add a Watcher during issue creation. You will need to do it via the UI or REST API through cURL after the issue has been created.
Example using cURL to Add Watchers (Jira Cloud)
curl --request POST \
--url 'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}/watchers' \
--user 'your-email@example.com:<api_token>' \
--header 'Content-Type: application/json' \
--data '"fred"'
You will need to use the username and not email address as the development docs didn't specify the email address field.
Although, there is a feature request on Ability to add watchers during issue creation which is still open as there's no current plan in it's implementation.
Cheers,
Prince
Hi @Prince N ,
I had create the Jira from rest API and I am trying to add the file watcher though Curl methodology.
And I had passed all the input which you had showed in the above snippet.
But its getting 400 response, Please let me know ,how we need to add watcher for a Jira ticket through Curl
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there way to add custom email to issue watchers (Cloud Jira)? I need to provide customers ability to watch submitted issue status. I'm trying to use Atlassian Account Id (i.e. f4ab4cd9b6345eb511ee8259) when adding issue watcher (/rest/api/2/issue/<issueId>/watchers), it works if the that id of api token user, but getting error for it is a custom Atlassian Account id. Currently I'm able to set issue reporter using the same method but it is not working with issue watch. The api user have admistrator permissions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there way to add custom email to issue watchers (Cloud Jira)? I need to provide customers ability to watch submitted issue status without jira access. I'm trying to use Atlassian Account Id (i.e. f4ab4cd9b6345eb511ee8259) when adding issue watcher (/rest/api/2/issue/<issueId>/watchers), it works if the that id of api token user, but getting error for it is a custom Atlassian Account id. Currently I'm able to set issue reporter using the same method but it is not working with issue watch. The api user have admistrator permissions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nadun,
As far as I know, and I could be wrong, there is no way to add a Watcher before or while the issue is being created. In other words; the only way I know of adding a Watcher to an issue is to do it manually after the issue is created. Also, I think the user ID is actually the first part of a users email now. I think, again I could be wrong, Jira will simply default to this and will not let you change it. Hope this helps - But lets see if others in the community agree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Joe Kyle
I am guessing the same thing. let's see if someone has a different answer.
Thank you very much.
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.