🚀 JWT 3.0 is out 🚀 

The app was completely overhauled, and so was the documentation: Jira Workflow Toolbox (Server/Data Center) Home

The page you are viewing is still valid for all app versions prior to 3.0.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Features used to implement the example



Example: Increment a field or set to 1 if it's not set

I want to increment a number field, but the issue I have with the function Mathematical and date-time expression calculator in that when the field has a number it increments correctly, but for the very first increment the Number field is empty, so the function requests that it be initialised and fails.

I then tried the Copy a parsed text to a field to see if this expression would work: %{11002} = Null ? 1 : (sum({11002},1))


You should use Mathematical and date-time expression calculator with the following expression:

{11002} = null ? 1 : {11002} + 1

Just for fun, this is an alternative expression:

{11002} = null ? 1 : sum(toNumberList(%{11002} + ", 1", ","))

Another alternative expression

sum([{11002}]) + 1



Related Usage Examples