The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

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

jdmcbride
November 18, 2012

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Michael Andreacchio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2012
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
jdmcbride
November 18, 2012

Hi Michael,

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

Thanks

John

TAGS
AUG Leaders

Atlassian Community Events