Hi,
I am trying to set a single user select custom field either via the JiraPS module or Jira Automation from the email of a user.
1. Via the JiraPS module:
I am using the following snippet:
$fields = @{
"customfield_yyyy" = "email@dn.com"
}
Set-JiraIssue -Fields $fields -Issue "xxxx" -Credential $Cred
I have tried several things, like "customfield_yyyy" = {name: "Firstname Lastname"} and things but that just set the field to none.
2. Via Jira Automation, it the same, I am trying to find the way to set the select with a hardcoded value but it always reset it to none. I using the following snippet in the advance issue edit action:
{
"fields": {
"customfield_yyyy" : { "value":account_id }
}
}
I tried several things instead of the account_id, but the behavior is the same.
I would like to apply approval based on this field so I do need a user select field.
Any idea?
Thanks!
Hi @Fabien Thoumsin and welcome to the Community!
I am not familiar with the JiraPS module you are referring to. But I would expect you should be able to do this with automation, most likely not even through the advanced fields option you are trying to use.
With the edit issue action I would expect you to be able to just select the field you are trying to fill out. And if this is indeed always the same value, you might be able to just select the desired user from the list, as you can see here for assignee:
Hope this helps!
Hi Walter,
Thanks for your reply, but this is not always the same value. I am using an external script to determine the manager of the requestor.
The script is in PowerShell and leverage the JiraPS module. As I was not able to set the single user select field form the script, I wanted to try with the automation.
In the automation, I would like to set the single user select field from an email address.
I tried first to set the field with a hard coded value but I could not succeed. The Json I used in the automation must be wrong, but reading the doc, I can't spot my mistake.
Long story short, this is not always the same value.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fabien Thoumsin -- Welcome to the Atlassian Community!
Adding to Walter's answer...
Your syntax using the JSON edit for a user-picker field is incorrect. Here is the syntax: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Single-user-picker-custom-field
And, you will not be able to select the user with their email address in this way; the account id is needed.
Kind regards,
Bill
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.