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 have a custom field (number) and on transition post function I want to increment the value by 1

On Jira Cloud I have a custom field (number) and would like to increment the value between a certain transition in the workflow. How can I do this? Do I just need to create a transition post function on a custom field? 

3 answers

Hi, if you want an old school way of doing this without an add-on or a script I did this:

I created a custom text field then added a post function to status change to add a field value  with an 'I' and selected Append Value so every time it passes this state it add another 'I', this resulted in a field displaying 'IIIIIII'

I then used this in a report by exporting into Excel and using the =LEN(cell) to count the number of 'I's in the field.  

Very nice, I've used this same concept for AtTask/WorkFront.  It works nicely.

1 vote
Taranjeet Singh Community Leader Jan 21, 2019

@Craig Bucklow You need to use a 3rd party add-on like ScriptRunner for JIRA. You can use a Scripted Post-function (from this add-on) on your workflow transition and use the code here (Modify it as per your custom field)

https://community.atlassian.com/t5/Jira-questions/How-can-I-increment-a-custom-field-value-in-a-post-function/qaq-p/74690

1 vote

Hello,

You would need an add-on for it. 

For example, you could use the Power Scripts add-on:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could write a post function with a code like this:

#{Your custom field name} = #{Your custom field name} + 1;

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