Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Setting a custom field to 0

Ste404
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2022

Hi,

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.

Thanks. 

3 answers

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2022

@Ste404 -

There is a simpler way to setup your automation -

2022-08-11_20-55-27.png

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

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2022

@Ste404 -

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.

2022-08-11_20-43-43.png

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.

0 votes
Iresh Rupasinghe August 11, 2022

You can set default value as 0.

image.png

Ste404
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2022

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
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events