How can a Jelly script retrieve a property value from the User

I have a Jelly script that uses the following to retrieve a User assigned to an issue:

{quote}

<core:invokestatic classname="com.atlassian.jira.component.ComponentAccessor" method="getUserUtil" var="userUtil/">

{quote}

I then use the object to get the email address and name of the user:

{quote}

${assignee.name} $

{quote}

I would also like to access some of the properties I have created - I cannot determine what method to call on the instantiated object which is : com.atlassian.crowd.embedded.ofbiz.OfBizUser

How can I access the properties for a User

1 answer

1 accepted

1 vote
Hi John,
As per our support issue you have found the answer. I'll just be making this public for our other users out there:

com.atlassian.jira.component.ComponentAccessor.getUserPropertyManager(user).getPropertySet().getString("jira.meta.MYPROPERTYNAME");
Note the key requires the prefix "jira.meta."

Personally I feel that using our REST API for this may be simpler, you would only need to get the assignee of the issue and then query the user.

Cheers,
Michael

Hi Michael,

I wanted to use Jelly scripting service hence why I implemented it this way.

Thanks

John

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted yesterday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

107 views 3 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you