I've setup a JA rule that pulls data from an API call, and responds with things like email, name and the unique Atlassian Id.
The component of "Assign the issue to" is set to 'Smart value' and will only take the Atlassian ID. I was hoping it would take email address, like importing from a CSV can, but I'm not having any luck there.
Is there a way to format the Full Name or Email Address value so that it will accept it?
side note: Ultimately, we're trying to auto-assign tasks by a combo of two values (Product & Department), on Create. If anyone has a better solution besides building an API for this kind of lookup, I would be grateful to hear your solution. It would be better if we had the simplest interface possible for line-of-business people to keep the lookup data updated, and would much prefer to keep this all within Jira/Confluence. Having to lookup the Atlassian ID to store it is not the preference.
If you use the email address as a smart value in the Assignee field in the Edit issue action, Automation will try to resolve that email to a user (it might not work if they've restricted access to their email)
Hope that helps!
Thanks @Mark Chaimungkalanont !
So instead of using Assign issue, I could use Edit issue Assignee field.
Regarding restrictions, is the Automation for Jira user considered to have access if an account Contact (email) is set for "Only visible to people who have access to the organization"?
Hi @Mark Chaimungkalanont - maybe I'm doing something wrong, but it still won's assign me by email address, for instance, here's the rule & log instance - and yet this doesn't show up as Jira Automation in the log of the issue, and it doesn't assign me.... support ticket worthy?
Thank you for responding @Alex Koxaras !
(it's currently listening to priority changes instead of new issue creation, for testing purposes)
Here's what is in the log for the various web responses (with some scrubbing of values):
email = firstname.lastname@example.org and name = Erin Quick-Laughlin and atlassianid = 5xxxxxxxxxxxxxxxxxxxd197
Using webResponse.body.atlassianid works.
When I change the rule to use webResponse.body.email or webResponse.body.name , it doesn't recognize those values to associate / assign a user. I was hoping it could recognize a user by email, like the import process can.
From what I know, users are tied to an id, atlassianid. I don't know what the problem of using an id is, but I'll take your word for it. I would definitely check the following URLs:
If the response you are getting from the web request, is e.g. the author of a comment, then you can use another smart value, instead of the atlassianid.
Thanks for the smart-values-users link - hadn't see that before. Helpful for the future!
I think what I'm learning here is that there's no way to code the email address to trigger JA to look it up and associate the Atlassian ID.
If we were pulling this information from within Jira, this would definitely be much simpler. Unfortunately, we need a way to store & retrieve users by a cross-index lookup of Product & Department - so far, I only see external solutions for that (thus the web request). If anyone has other suggestions to keep this type of lookup within Jira, I'd love to hear it!