You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi!
Does anyone know how I would update a user picker field like Reporter using plain text from a plain-text custom field?
I'm trying to pull the value from a free text field from related tickets and then change the reporter on the related tickets to the email value froim the custom plain text fields. Please see the attached photos for my setup.
The advanced edit (to update the reporter) looks like this:
{
"update": {
"Reporter" : [
{
"set": {
"id":"{{triggerIssue.NGSD: User to transfer docs to (Free Text).accountID}}"
}
}
]
}
}
The errors I'm receiving suggest to me the automation is reading the smart value as the plain text email and not liking it. Needless to say the automation test was unsuccessful.
When I tested this in my sandbox instance from a user picker field it worked so it must be due to the email being free text.
Ultimately I just need to find a way to add the free text value (email address) to the reporter field.
Any help on this would be majorly appriciated!
Thanks!
Mike
If I am understanding your use case correctly, you cannot set a user field from just the email address in a text field. Instead you will need to find the user's account ID and use that to set the Reporter.
If you are trying to do something else, would you please clarify the problem you are trying to solve? Thanks!
Kind regards,
Bill
Thanks for confirming that @Bill Sheboy
Do you know if it woudll be possible to find a user ID by searching the free text of the email within the jira automation?
Guessing it's not possible so I'll likely have to change the field to a user picker/find another solution..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is possible by calling the REST API using a web request to query for a user with that email address. That approach will take a few seconds for the rule to run. For example, which you can try in a browser to confirm it works for you:
yourJiraUrl/rest/api/2/user/search?query=emailAddressToFind
Here are some references to get you started:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Bill Sheboy I appriciate your help with this.
Unfortunately it seems like I'd need to store an auth token in plain text in the automation which poses too much of a security risk, unless you know of a way to encrypt that?
Thanks,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Several people have pointed out that potential security issue for rules. There is one improvement that can help a bit: You can limit who can edit a rule and so that will limit easy visibility to the token.
There are also some open suggestions for better security of tokens/authentication:
https://codebarrel.atlassian.net/browse/AUT-1458
https://codebarrel.atlassian.net/browse/AUT-2117
https://jira.atlassian.com/browse/JRACLOUD-77817
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like https://codebarrel.atlassian.net/browse/AUT-2282 was implemented; headers can now be entered separately, and hidden.
Now the problem I'm having is that the api call for user search isn't working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Back to the OP.
We are still having problems in that we can retrieve a pure text field of either a person's ID or their name but putting text into a people picker field in Jira Service Desk gives us this error suggesting you cannot do this:
java.lang.ClassCastException: class java.lang.String cannot be cast to class com.atlassian.jira.user.ApplicationUser
I'm hopeful that if a text field in Jira can be populated, there might be a away to automate (e.g., Automation for Jira) a people picker field.
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.