It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to get project name of a project picker customfield

Hi guys, I'm using the behaviours plugin and I would like to extract the name of a project selected in a project picker. I tried the following: FormField projectPicker = getFieldById(fieldChanged) projectPicker.getFormValue(); but this returns only the id. Is there a possibility to extract the name? Kind regards

3 answers

1 accepted

0 votes
Answer accepted

Actually sorry, try getValue() instead of getFormValue(). That does some conversions and may well give you a Project object. In which case you can just look at the .name property.

You will need to use com.atlassian.jira.project.ProjectManager#getProjectObj to look up the project object by ID.

hi Jamie

can you please add the code for getProjectObj

Hi Jamie,

Thanks for your Answer!

Got it =)

Kind regards

Maik

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Align

Best Practices in Jira Align

Hello Jira Align customers! In order to better serve you on your journey with Jira Align, the Community team has worked with the Jira Align team to curate the content in this collection to better s...

101 views 0 3
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you