Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

We highly recommended to test your expression before publishing the workflow.

5 steps to test your expression

UI Steps


UI Step

Type in your expression or select one of the built-in examples.


UI Step

Click on the Run button Image RemovedImage Added


UI Step

Select an issue you want to test your expression with.


UI Step

Confirm your selection by clicking on Run


UI Step

Check the resulting output or analyze the errors.



UI Expand
titleSyntax check

Before running your expression against a certain issue, it's recommended to check if the syntax is correct.

The syntax check button shows if the current expression in the input field is syntactically correct or not . The background check runs every secondat least one second after the last input, but you can also push the Syntax button for instant results.

Multimedia
nameparser-field-parser-error.mp4
width700



UI Expand
titleThe run button

Image RemovedImage Added

By clicking on the Run button, a test expression panel is displayed under your expression. To test your expression, do the following:

  1. Select an issue that you want to test your expression with (as the current issue).
  2. Click on Run


Multimedia
nameparser-field-run-button.mp4
width700



UI Expand
titleError messages

Even if the syntax of the expression is correct, it may happen that the expression result is erroneous, e.g. when fields are empty.

In the example below the value of the custom number field "cf10041" is returning a value which is not valid parameter for the function substring().

Image Modified


UI Expand
titleOutput of different data types

Depending on the Parsing modes and the expression itself, different Data types are being returned as a result of the expression.

UI Expand
titleGeneral mode

Expressions written in the General mode will return texts, numbers or lists.

Image RemovedImage Added


UI Expand
titleLogical mode

Expressions written in the Logical mode will return a boolean value of true or false.

Image RemovedImage Added


UI Expand
titleJira expression mode

Expressions written in the Jira expression mode will return objects based on Data types (Jira expressions).

Image RemovedImage Added



UI Expand
titleTesting a complex expression

When composing complex expressions, e.g. in Logical mode or the Jira expression mode, where you compare values we recommended to:

UI Steps


UI Step

Create individual expressions for the operands of the comparison.


UI Step

Test each expression separately within the selected Parsing modes.


UI Step

Merge the individual expressions and test the complete expression

Example with screenshots/screencast (I don't know which is the preferred way here) And if someone has a really good exmple instead of mine: please adjust!!

Goal: creating a comment with a remark if an issue is overdue for more than one week

  1. Find issues which fulfill/don't fulfill the condition and use them as the selected "current issue"
  2. Build a condition
    1. General mode: Difference between issue.dueDate and issue.created by using the number values of the dates ({issue.dueDate} - {issue.created} (=> some milliseconds) Remark: display the text values for control with %{issue.dueDate} and %{issue.created} in a separete line 
    2. General mode: Getting the days: extend the expression:  ({issue.dueDate} - {issue.created})/DAY  Remark: omitting the brackets is a nice error source
    3. Logical mode: Adding the comparsion ({issue.dueDate} - {issue.created})/DAY > WEEK
  3. Use this condition as parameter for the conditional operator (General mode): Issue %{issue.key} %{({issue.dueDate} - {issue.created})/DAY > WEEK ? "is overdue" : "is in time"}

Running a test with wrong syntax 

Julian Riedinger brauchen wir das?

Even if you omit the syntax check, you can test your expression using the Run button. In this case, the same error message as for the syntax check is shown.






Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue

...