Post-Function Complete Fields From Project Roles

I'm trying to fill in certain fields (like Product Manager, Dev lead, QA lead, etc.) when an issue is created. These values would probably be derived from project roles. How can I do this?

1 answer

1 accepted

As I know there is no exact solution for that issue (+ you should define what to do if there is more than one user inside project role), so the easiest way is to implement the logic as a postfunction using script runner. see for details.

Thanks for the response. We have this installed already and this would probably be the best way forward.

Handling multiple people in a role is a good reason to script it so we can handle exceptions with ease.

To be specific, do you know how I can (1) change in custom fields and (2) access the project Roles via script.

1. If you are doing that in postfunction - something like

String customFieldName = "customfield_11112";

CustomField cf = customFieldManager.getCustomFieldObject(customFieldName);


2. refer to



You've given me the right answer so I've marked the question as answered so you can have your karma (whats the Reddit to Atlassian karma conversion ratio??) but I had two more questions.

How would I access the component lead and utilize this information in Script Runner?

Is there documentation on how to access this data?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

22,774 views 2 7
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