Hello everyone.
We have a custom field called "Procurement Initiator" which is a user picker field. Is there a way to send a list of tickets to the user selected in the mentioned field?
To be more specific I would like for each user selected as Procurement Initiator to only get tickets where their account is present.
Here is how the rule is currently setup:
NOTE 1: There is no JQL in the first component of the rule (Scheduled)
NOTE 2: If I were to add an email in the "To" section of the Send email component, the rule would work and would send a list of tickets with all tickets that satisfy the provided JQL in the Lookup issues component.
It is not possible to create separate rules for each Procurement Initiator since more than 100 users can be selected as one.
Thank you for the help.
Hello @Danilo Simic
Take a look at the Answer from @Kian Stack Mumo Systems on this post.
After the Lookup you need to add a branch to loop over the unique Procurement Initiator values (where the answer shows cars). Within the branch you do another Lookup for issues for each Procurement Initiator, and send an email with those results.
Thank you for the suggestion. I took a look but I am failing to make it work.
I am afraid I am missing something trivial. Here is the rule setup and what the error looks like in the audit log:
The rule is made up of the following modules:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The easier problem to address is the email issue. For the Send Email action you need to provide the email address for the user. To do that for a value from a single user picker field you would append .email to the smart value; i.e. {{issue.assignee.email}}
The more complicated issue is the smart value in your branch. Where did you get that code? I have seen things like that but haven't actually used it. I think it is incorrect. When I try to use it myself I'm finding that it provides no value back to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works for me. I used the Assignee field for testing.
Step 1:
Step 2:
Step 3:
Step 4:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found the code on the community post you provided me with in your first reply.
I tried changing the automation rule to match your setup:
customfield_10046 is the "Procurement initiator" field
With this rule setup I get an error saying that there is no email provided:
Judging from the audit log, the lookup module finds the correct issues.
Am I missing something obvious? Did I maybe not write the customfield property correctly?
Thank you for the help, sorry for being difficult.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to be using the field name, not the variable name, in the smart value to use in the TO field for the Send Email action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got the same error
I also tried typing {{lookupIssues.first.Procurement initiator.emailAdress}} in the "TO" section of the Send email component and got the same error like in the screenshot.
Then I tried with the following changes:
The error message is a bit different this time:
I do not understand why the error message says that there is no issue present when the 2 lookup modules find issues without any problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have misspelled the smart value in the TO field. I'm sorry I didn't notice that. emailAddress needs to have two "d"s
{{lookupIssues.first.Procurement initiator.emailAddress}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am such a fool. Now the rule works great. Thank you very much for the help.
Side question, if I wanted to also edit those ticket for which I just send an email, how would I approach that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Never mind my last side question. It is not needed and will not be needed.
Once again, thank you very much for the help.
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.