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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I need to auto increment the field " Numbers" which is a text field.

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 inc3.PNGincremented instead of doing it manually. Since I am not very good with scripting I am trying to use "automation for JIRA"

2 answers

Hi @Priyanka khare 

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}}{{/}}  

 

0 votes

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)

Jack Community Leader Jan 11, 2021

+1 for converting to numeric field

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you