Versions Compared

Key

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

...

For example, if you configure the following JQL query in a configuration screen of JSU:

Configuration in JSU

...

parent

...

=

...

{issue.Parent}

...

AND

...

component

...

!=

...

{issue.Component/s}

...

OR

...

component

...

is

...

EMPTY

...

it will be changed by JSU into something like this, before the search is executed:

Values after replacement

...

parent

...

=

...

'ABC-123'

...

AND

...

component

...

!=

...

'Documentation'

...

OR

...

component

...

is

...

EMPTY

...

This will search all sibling issues (same parent), which do not have the same component as the current issue (in this example Documentation).

Any text in curly brackets, which follows the pattern {issue.FIELD NAME} will be replaced with the value of that field on the current issue (issue in transition). See bellow below for further details on what names you can use for the different field types.

...

Logical operators, Functions, and operators are the same as the JQL in JIRA. It is important to use the correct JQL syntax.

The easiest way to write a JQL query for JSU is to prepare it first in Jira's standard search interface (use 'advanced search'!) with some sample value. Then copy it to JSU configuration and replace some of your sample values with {issue.FIELD NAME} as required.

...

Add the following to your JQL query:

...

...

...

AND

...

key

...

=

...

{issue.key}

Fields on the parent issue

...

...

...

AND

...

key

...

=

...

{issue.parent}

Fields on all sibling issues (other sub-tasks of the same parent issue)

...

...

...

AND

...

parent

...

=

...

{issue.parent}

...

AND

...

key

...

!=

...

{issue.key}

  • sub-tasks with the same parent: parent = {issue.parent}

  • excluding the current issue: key != {issue.key}

...

JQL in JSU can be very powerful. However, you also must think very carefulcarefully, about what values might be used as replacement replacements for the {issue.FIELD NAME} placeholders. Or what happens, if an issue has no value on in such a field. There could be quite some variety in the data of your issues.

(warning) If you are not careful, the result of such a JQL query unexpectedly might contain thousands of issueissues. Or the JQL query might fail , because the syntax has become invalid after the placeholders had been replaced.

...

You can set a limit for the maximum number of issues you expect from your JQL query (see also the previous paragraph). If the result of the JQL query returns more issues, JSU will not process anything. JSU is pulling the emergency brake before things get out of control.

Like this, you can prevent JSU from accidentally processing hundreds of issueissues.

By default, this limit is 50. You cannot set any higher limit than 1000.

...

Replaceable value from the current issue must be between curly brackets like

...

{issue.FIELD

...

NAME}

System Fields

Use the place holders from the following list:

...

While you configure a new workflow with JQL queries in JSU, you might even set the log level to DEBUG for the following package:

...

ch.beecom.jira.jsu.util.jql

See Troubleshooting to learn how to change a log level.