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.
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.
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