I have an Insight object type (Support Responsibility) with a Role attribute that is of the type User (multiple selection is possible).
How do I get the value of the Role attribute (the users) in a custom field of the type Multi User Picker? We plan to use the users in this custom field to manage notifications.
So far I've tried using Process Automation and Smart Values, but they only gave me access to the Key and Name attributes, and not custom attributes (such as Role).
How would you solve the problem (preferably without scripting).
Using Jira 9.1.0, on-prem.
Thanks in advance.
Hi @Kölker_ Finn ,
Indeed you can not retrieve the EmailAddress from an insight User attribute from a smart value, this is weird as this works for every other User custom field :)
The workaround you could use is the following : you can populate a multi-user custom field based on the users in the attribute "Role" of your Insight object "Support Responsibility".
To do this, build an automation rule which edits your multi-user custom field. To edit the custom field, select the "Advanced" option and enter the following JSON :
Let me know if it works,
Thanks for your answer!
Getting the users in Role 1 via the custom field does not work. But what we have done now is to send a web request via Project Automation that provides us with the data we need. Your suggested JSON formatting helped a lot.
The selector currently looks like this:
And returns us this:
What I am currently failing at is making a list of user names from this array of JSON objects. So what I need would be at best:
Do you have an idea on how to achieve that?
Unfortunately I'm no JSON expert,
Are you sure getting the users in role 1 doesn't work ? I tried it on a test instance and it worked.
Can you please try to add a comment in an issue with the following smart value and tell me what you ou get ?
And with your API call you could try removing the "asJsonObject" part and see if it's better ?
Thanks for your fast answer.
the added comment's content is just "".
Or could it be that the key is wrong? Do you know if I can somehow display the Insight object in JSON format?
If I remove the "asJsonObjectArray" of my API call, the response gives me more information, that I do not need.
Using the API call I mentioned in my previous comment, I've narrowed down the content of the response as much as possible, which is what I was getting at.