Clear any field

This is a tutorial shows how to clear a custom field

Assumption

The custom field in this tutorial is called Database Version of type Single Select list on this instance ID: 10301

Steps

  1. Create a new Action by clicking CREATE button
  2. Enter a name: Clear field and click CREATE
  3. Select Method: PUT and URL: <your_base_url>/rest/api/2/issue/{{issue.key}}
    From the Atlassian REST API we can read that to set a custom field we need to call PUT /rest/api/2/issue/{issueIdOrKey}
  4. Select Authentication method: Basic Auth, specify an admin user that can add users to groups in JIRA.
  5. Add request headers, key: Content-Type with value application/json
  6. On the Body section add the following

    {
        "fields":{"customfield_10301":""}
    }
  7. Click Triggers tab
  8. Select ISSUE RESOLVED event, in this example we will use the Issue Resolved to clear the field.
  9. On JQL Condition. When to execute the event(s) write Project = TESTB and to limit the trigger to the TESTB project
  10. Click SAVE
  11. (Optional) Click Test button, Issue Key needs to be provided and click Send, Then go 3 - View Execution Log.