In one of our Workflows used by many spaces we have a Post Function in which when the issue moves from Design status to Development status we populate a Custom Field called Design Approver with the name of the person that performed the status move. We are using the suggested %%CURRENT_USER%% value.
Our challenge is that if that custom field is already manually populated when the status moves we do NOT want to update the field with the %%CURRENT_USER%% value.
Since this Workflow is used by several spaces I am trying to avoid using automation.
Am I missing something in the Post Function that will not overwrite the field? TIA
Post functions don’t have a built-in “only set if empty” condition. They will overwrite the field if it’s configured to update it. If you need that logic, you’d typically handle it in Jira Automation with a condition like “Design Approver is empty” before setting the value. That’s the cleanest way without impacting other projects/workflows.
Hello @Kathleen Hamilton
Does the transition include a screen where this field can get set/cleared manually?
The native workflow post function for setting/updating a field doesn't include the ability to add conditions. That would require a third party app.
If the transition doesn't include a screen where the field can be set/cleared manually then a work around is:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.