We need to notify multiple people when a bug is created (product manager, dev lead). Adding a post function to the Create transition in the workflow to assign to project lead only gets us so far.
It seems there are many ways to do this with a script in Jira Core, but I have yet to find a solution for Jira Cloud.
Apologies if this has been solved in the past! Please link if this is the case.
Hi Beverly,
In workflow post-condition of Create issue, we can add users as watchers.
Since Jira doesn't allow us to update this field in post function, we can create a dummy watchers field and add users to it, then add one more post function to copy values from dummy watchers field to actual Watchers field.
This will be useful for your company's product manager, dev lead etc.. to track using "issues watched by me" filter. I assume your notification scheme might have watchers added to all activity. So, it should send out notifications to them.
Thanks Ashwin -- what I'm seeing is that there isn't a post function to actually copy values from a dummy watchers field to actual *Watchers* field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You'll have to create new custom field something like "Dummy Watchers",then assign it to project and then use "Update Issue Custom Field" option in workflow post condition.
Next step is to add "Copy Value From Other Field" post function, here add source field as "Dummy Watchers" and Destination field as "Watchers"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, but in the second step, the actual Watchers field is not part of the pick list for Destination Field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you check if the dummy custom field created is of type "User Picker" ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I realize I made my dummy Watchers field just "Watchers" and it actually overloaded this option in the picklists!
Now that I made my dummy Watchers field "Watchers (dummy)" it shows up as your screenshot does.
Thank you!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aswin Achuthan Sorry to be so annoying.. I've been at this for an hour. I can't seem to get the data type to be right. For example, I just want myself to be added to a watcher on bugs that are created.
I've tried setting Watchers (dummy) as a User Picklist and also as a free text field. I've tried beverly and Beverly Vessella and all quote combinations. Watchers (dummy) is set correctly.
But when I try the second step of copying this value over to the real Watchers, it's complaining to me that the field configuration is wrong.
Do you have suggestions for the exact data type or syntax here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Beverly Vessellano problem :)
The custom field(Watchers dummy field) type should be User Picker (multiple users)
And, value to update in dummy watchers field should be the username.
Let me know if you face any issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aswin AchuthanI don't know what I'm doing wrong.
Custom Field: "Watchers (just Beverly)"
Username: beverly
Post functions on Create:
Published the new workflow. Results when I try to create a new bug:
Thanks so much for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The system has no issue with the first post function of setting "Watchers (just Beverly)", but throws the error when I add the second post function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Beverly VessellaThose two post functions should be added after existing post condition. The order of post functions really matters :)
so basically, we can update the fields only after issue is created. let me know if it works! :)
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.
no problem :) Glad I could help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aswin Achuthan i have created Dummy watchers and assigned to the project. Since i need only two users to be auto watchers, i am not sure who to do it.
it would be great i you can help it for me.
@senthil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as you said in the last updates, i have a question. What should we have to do on "Update Issue Custom Field" option in workflow post condition."
Appreciate your help.
Senthil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Senthilkumar use comma(,) to separate users if your custom field is multiple user picker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have the JSU Automation Suite, you can do this by adding a "Update Any Issue Field (JSU)" Post Function to update the system field Watchers directly (rather than the "Update ..." and "Copy... " two-step process above).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Aswin Achuthan what do i do if i don't have 'Copy Value from Other Field' option available in my 'Add Post Function to Transition'?
Hope you can help me, thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted] , you need third party plugin to do that in server/DC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have 2 options.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey everyone, I need some help with this.
I can't seem to get the post function 'Update Issue Custom Field' to set the User Picker (multiple users) with a username.
I've tried the user's full name, username, email address, and I can't even get it to work when using %%CURENT_USER%%. For some reason, it just won't populate the user picker with a username that I can use to copy to the watcher field.
I've also tried moving the post function positioning around and that did not seem to help either.
Does anyone have any ideas?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Might be a bit late to help you, but when I ran into the same issue, it was because I'd set this Post Function to run before the issue was created. Make sure your post function happens after "Creates the issue originally."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Out of curiosity, since you can't assign the value of watchers in the post section until after the issue is created, does that mean that the watchers will not get notified of issue creation, even if notification scheme says "all watchers" for issue created event?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Jira guru, I've managed to setup automatic watchers adding on creating an issue, thank you for all the comments above.
But I'm struggling with the next problem:
Any ideas are highly appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm trying to assign several watchers in the same ticket
I'm so sorry, but i used to do it with old versions and this it was so easy to use.
Now, i'ts a nightmare .. can't believed i have to do all steps wroted above
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Beverly Vessella You can manage this in your notifications scheme.
Open Jira Administration>Issues>Notification Schemes, find the scheme for the desired project and click on notifications. Add the desired users, roles, or groups to the notification for Issue Created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jonny! I was afraid this was the only way :). We have a tidy notification scheme right now across all projects and issues types. Looks like I'll have to make a different one to apply to just bugs in particular projects.
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.
@Beverly Vessella Notifications are project based so you wouldn't be able to specify a particular issue type unless you used an add-on. We use Automation for Jira which will allow you to specify issue types and trigger a notification to particular users/roles/groups when created.
I believe ScriptRunner may also provide similar functionality.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there! It's possible if add the post function to a flow and then use this flow bug bugs only (I know you conversation was a year ago, but maybe someone finds it helpful)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.