I need to auto increment the field " Numbers" which is a text field and I am using "Automation for JIRA" for the same. Please find the attached rule which is not working because I am missing something in the rule. Can anyone please look into this .
My requirement is that when ever any new issue is created in my project the "Numbers" field should be auto incincremented instead of doing it manually. Since I am not very good with scripting I am trying to use "automation for JIRA"
You can achieve that by using the smart function "asNumber()" to convert the text field to a number, however you need to be sure that only numeric values will be present in the field.
You can do this as follows:
{{#increment}}{{issue.Numbers.asNumber}}{{/}}
The increment function cannot read strings and guess that they might be numbers. You'll need to code something that converts to a number, adds something to it, then converts it back to a string. I do not believe automation can do that.
You'll need something like Scriptrunner, or change to using a numeric field (then the increment function in Automation will work)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
+1 for converting to numeric field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.