This is the JSU for Jira Server/Data Center documentation. If you are using JSU on Jira Cloud, see our JSU Cloud documentation.
Description
The 'Clear Field Value' post function clears the value of a specified field after a transition has been completed.
Configuration
You must specify the field to be cleared, for example, Fix Version.
For more information on how to add a post function to a workflow in Jira, see the Jira documentation.
Precondition
If you are using preconditions with a JSU post function, they can be evaluated in one of the following ways:
Ignore precondition: (By default every precondition is ignored which means that the post function will always be performed)
True: (Precondition must be true to execute a post function)
False: (Precondition must be false to execute a post function)
Learn more about JSU preconditions in Workflow Preconditions.
Issue relation
The field can be on the issue in transition(within the same issue) or a related issue, like a subtask, a linked issue, or an issue within an Epic (during the transition on the Epic).
See Related Issues for more details.
Perform As User
When choosing a user account to run a post function, the account specified must have the appropriate permissions to perform the actions of the post function, for example, creating an issue or adding a comment. You can specify a different user account that owns the necessary permissions that acts only as a technical (impersonation), with broad permissions, but not used to log in to a Jira account as an individual.
If you don't specify a user here, the transition on the related issue is performed as the same user who triggered this post function on the origin issue by default. Therefore that user must have the necessary permissions on the related issue. In some setups, that user might not have the required permissions on the related issue or even access to the project of the related issue.
In combination with the User is in Any Users condition, you can hide a transition from all users other than the 'Perform As User' user.
Position of the post function
It is important to place the post function in the correct order with your other post functions.
Create transition
The ‘Create' transition is the first transition, which does not have a source status (only destination status - usually Open). If you are using the ‘Clear Field Value’ post function in the 'Create’ transition, you must put it before the "Creates the issue originally" post function except when clearing labels, which need to be cleared after the issue has been created.
Any other transition (not Create)
Put the ‘Clear Field Value’ post function anywhere before the "Update change history for an issue and store the issue in the database" post function.
Example
A workflow is configured so the 'Close' transition has the 'Clear Field Value' post function. The function is configured to clear the 'Security Level' field. If a user closes an issue on this workflow, the value of the 'Security Level' field will be cleared.
Supported field types
JSU supports many different field types such as system fields and custom fields. However you should be aware, that not all field types are supported, and not in all combinations. We aim to cover the most important field types and are continuously adding and improving how different field types are supported. Some custom fields of other third-party apps might never be supported. You should always test anything you do with issue fields with JSU. You can try it with a free 30-day evaluation license.