Hello, could you support me with this use case? In my Jira instance, in the notification scheme, we have configured in Email Notification Preferenses send an email when "the issue is assigned to you" and this works ok, but when including a post function in workflow that automatically assigns the card, the person who has been assigned does not receive the mail. Can someone give me clarity why does this happen?
I think your problem with the order , Can you please check the order of your post-function and be sure that it is before firing issue event
Hi @Mohamed Adel Thanks for your help, I add a screenshot to see the order; I understand that the execution rule that I automate happens first. In what order should it be executed so that it then executes the action of notifying the assigned users?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now the problem is that you are trying to assign your issue but the fired issue event is Generic Event and this is not the one you configured your notification scheme for as you configured "Issue Assigned" Event , try to add your assignee script after firing the Generic Event and let's see how this work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again @Mohamed Adel . I followed your advice and changed the configuration in this way, but still the notification scheme did not send the mail
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Daniela Buffarini good, now let's check your code how you are setting the assignee can you share your custom script
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. This the code and assign the user correctly
Text:
import com.atlassian.jira.component.ComponentAccessor
def userManager = ComponentAccessor.userManager
def someUser = userManager.getUserByKey("xxxxxxx")
issue.assignee = someUser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok , update your script to be like the one in this thread
https://community.atlassian.com/t5/Jira-questions/Updating-assignee-via-scriptrunner/qaq-p/637155
import com.atlassian.jira.component.ComponentAccessor
def issueService = ComponentAccessor.getIssueService()
def userManager = ComponentAccessor.getUserManager()
def user = userManager.getUserByName("tbas")
def validateAssignResult = issueService.validateAssign(user, issue.id, issue.reporterId)
issueService.assign(user, validateAssignResult)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also, move your assignee script order to be before the Generic event ,the ordering is not the issue now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now with this code I try again, but it does not make the change to assign the new user. Assigne remains unchanged. If it was Unassigned, it remains unchanged. Test in both circumstances, with the rule before General Events and with the rule after General Events with the same result. It does not update in assigne. I can not understand how to achieve the assignment and the sending of mail. Coud you keep helping me @Mohamed Adel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Daniela Buffarini is there any error in the script history log?
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.
This is how notifications are configured for the project, just in case
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the configuration on issue assigned event ?
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.
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.