Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Setting a custom field to 0


I have a custom field (10215) which is a number field and in automation I simply want to set it to 0 at the start of the automation.

I have tried editing the issue with a value of 0 and then a "fields" and the name and setting it to 0.

I am sure it is simple, I just can't get it right.


3 answers

0 votes

@Steven Lees-Smith -

There is a simpler way to setup your automation -


where you just need to select your custom (number datatype) field from the dropdown as an action, and enter in "0.00".  You don't need use the code element under More options section.

Best, Joseph

@Steven Lees-Smith -

For your information, as default, a custom (Number datatype) field always are 0.00.

To supplement what @Iresh Rupasinghe suggested, here is the screen where you can set the default value for the custom (number datatype) field - click on Edit Default Value link.


Important Notes - You need to ensure that you are editing the appropriate context configuration.  Example in my screenshot, it is for all the issue type associated to the Viasat Service Request project only.  If you are not careful with the setup, then potentially you can changed the context configuration for other projects by accident.

On the other hand, you mention you were not successful using Automation for Jira rule setup.  Can you provide more details (i.e your rule setup + what kind of error if any)?  Using Automation for Jira rule avoid the need to configure context setup against custom field.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

You can set default value as 0.


it is initially set to zero in the custom field setup.. but I want to reset it to zero when automation runs.


I think I just sorted it

"fields": {
"customfield_10215": 0

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events