Using project role in post function to fill custom field

How can I get a custom field to autofill with the project role using post functions in a workflow?

For example, when I create an issue I would like the merchandiser custom field (userpicker) to be filled by the merchandiser project role in that project as these are normally the same person. However these could then be altered and it will use the merchandiser custom field throughout the rest of the workflow.

Not sure how easy this is to follow...

1 answer

There is no easy option for onDemand. For standalone I would recommend you to use the https://jamieechlin.atlassian.net/wiki/display/GRV/Post+Functions script runner postfunction, as for the onDemand - it is possible either to write a separate application that will use JIRA REST API https://docs.atlassian.com/jira/REST/latest/ (search for recently updated tickets and change custom field according to that) and be running with cron or some scheduler periodically either to write a plugin using atlassian connect https://developer.atlassian.com/static/connect/docs/index.html

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
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

671 views 3 11
Read article

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