Hello,
I'm trying to implement the following use case in a project workflow.
As a controler I've to approve or reject a ticket in my workflow step. When approved I have to assign it to the next controler in process. the project has various project roles to distinguish approval responsibility in the whole process.
Therefore I searched for a way to dynamically pre populate the assignee user picker field on the approval transition screen. It should be limited to users that are only members of the next accountable project role. So the intential goal was to limit user selection in the assignee field.
After some investigation it appears there is no way to accomplish that. So I followed another idea. I've created a helper/transient custom field (single select) put it on the transistion screen and pre populate it with all members of the desired project role in its options. In conjuction with a scriptrunner behaviour initalizer and change script I'm able to set the now hidden assignee field on that transition screen.
So far so good, now I'm faced with the server side validation that prevent the transition due to the fact that the dynamically created options in the helper select field are unknown and invalid.
I'm slightly frustrated. :-)
I can't maintain all Users as pre defined options in the custom field configuration to filter them later as seen in many script examples. Is there a way to disable the form field validation of the custom field? Or any other ideas to implement the described use case?
Best greetings,
René