We want to set a "User Picker" custom field on a new issue to default to the first person with a given role on the project. We want each issue to store this person so that it can be changed per issue, but we want it to default to the project role.
For example, if we have a "Lead Tester" role we want whoever has that role on a project to be the default user in a corresponding "Lead Tester" custom field on each issue.
I'm using Post-Functions in the Create transition on the workflow but I can only set the assignee to a project role, I can't set other fields to a project role.
As a clunky work-around I'm setting the assignee to the role, then copying the assignee to the custom field, and then setting assignee to reporter. This works okay but means we can't manually set the asignee field on creating a ticket, because it gets overwritten.