Hello,
I would like to setup a Jira automation rule with a manual trigger plus user inputs which are used during further issue creations. The user inputs contain a firstname + lastname of a user which I need to get converted to an account id which I can then use in request participant fields.
How do I do that?
I have found already that post:
Solved: Jira Automation: Convert string containing user's ... (atlassian.com)
with that link:
The Jira Cloud platform REST API (atlassian.com)
but am afraid, that I do not understand how do use the Jira cloud reset api. So could maybe someone help me out with the actual code which I can paste for the described scenario into the automation steps?
Much apprieciated. :)
Regards,
Marc
It is safer and recommended that you use the email and not the user's first and last name in the API query.
But in summary what you should do is something like this:
- Every manual automation where the user enters a value creates an input variable for the field. In this field, users must use their email address instead of their first and last name.
- Then add a Send Web Request ACTION
- Not Mandatory, but interesting: Add an Audit Log action with this smartvalue: {{webResponse.body.accountId}}
This is the accountId of the user collected by your web response.
- Add an ACTION for EDIT Issue
{
"update": {
"customfield_10025": [
{
"add": {
"accountId": "{{webResponse.body.accountId}}"
}
}
]
}
}
Change the number (10025) for your custom field number.
Here an example print
Hope this helps you :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.