How to clear a custom field value through an automation rule during issue clone

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

By default, Automation for Jira does not list all the fields that we want to clear their current/default values.

Environment

  • Jira Server/Data Center on any version from 8.0.0
  • Automation For Jira (A4J) Server/Data Center on any version from 7.4.0

Solution

You can follow the steps below to clear any field values when you clone an issue:

  • Navigate to the Automation rules page and create a new rule
  • Select Issue Created
  • Click on New Action, select Edit Issue and then click on More options
  • Paste the script below into the scripting area: 
    {
      "fields": {
        "customfield_10301": null
      }
    }

     You need to replace 10301 with your custom field ID. You can find it by navigating to Administration > Issues > Custom Fields, then click on the ... > Edit details. You will find a number at the end of the URL. You need to replace 10301 with that number. It's the field ID

  • Save the rule and then test it with cloning one of the issues that has a value in the field in question.




Last modified on Jan 15, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.