Versions Compared

Key

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


Smart Fields in Automation for JIRA also support a number of string manipulation functions.  This works with any 'text' type field such as summary, description, and text custom fields.  You can also use string manipulation functions on issue sub-attributes, such as the {{issue.fields.reporter.displayName}}.

Supported functions

We support the following methods.

...

Abbreviates a String using ellipses. This will turn "Now is the time for all good men" into "Now is the time for..."

See StringUtils.abbreviate(int) for full details.

...

  • Hello World!
  • _Andreas_ and _Nick_

...

  • {{issue.summary.match(".*(lo).*")}}
  • {{issue.summary.match("_([^_]*)_")}}

...

  • lo
  • [Andreas, Nick]

...

Performs a regular expression search and will return the first (and only one) matching regular expression group. The underlying implementation is based on Java's Pattern class and uses Matcher.find() to find matches.

If multiple matches are found, they will be returned as a collection that can be iterated.

This can be used to find a single pattern match (e.g. extract a version number from the issue description) or to match multiple patterns (e.g. extract all e-mail addresses from an issue comment).

...

Functions can also be chained so you can do something like:

{{issue.summary.toLowerCase().substring(0, 10).concat("!!")}}

Please contact us via support or ask in the Atlassian community and we'll try to help you out!
Info
titleCan't find what you're looking for here?
Info

Our documentation has recently move to a new location! Please head on over to: http://docs.codebarrel.io/automation/#/smart-fields/working-with-strings