Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2.7.0


Section


Column
width30%600px


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel1



Column




Example:

 Setting a custom field with project and property and custom fields

Using project properties to calculate custom sequence numbers

In this example, a custom code shall be created identifier "Approval Code" is added to issues by using a project property and different custom fields. This should be happen when transitioning the issue to a new status.

The code that will be created is a combination of a specific number (sequence number), the fiscal year (custom field) and abbreviation of a department and will look like this:

003/2018-2019/DEV

BITTE DIE MAKROS UM NAME DER POST FUNCTION (LINKES MAKRO) UND WEITERE LABELS (RECHTES MAKRO) ERGÄNZEN UND HIER DIE SECTION LÖSCHEN!

Configuration items needed are:

  • Project property "sequenceNumber"
  • Custom Text Field "Department"
  • Custom Text Field "Fiscal Year"
  • Custom Text Field "Approval Code"


Setting the project property

Setting a project property can be done via the project settings → Details.

Image Added

A valid expression is: {sequenceNumber=0}

Adding multiple post functions

When executing the transition, the current value of "sequenceNumber" is stored in an ephemeral field with the Read a project property post function.

Image Added

Name of project property is: sequenceNumber


Info

Ephemeral fields are temporary fields that can be used within a transition, e.g. to cache temporary values. They're cleared when the transition is completed, unless a Inhibit ephemeral fields auto-clearance post function is added to the transition.


Incrementing the "sequenceNumber" by one is done with a Mathematical and date-time expression calculator post function.

Image Added

Formula is: {00058} + 1

Note that:

  • {00058} is the field code for Ephermeral Number 1


Formatting the "sequenceNumber" is done with a Set a field as a function of other fields post function: This ensures that the sequence number is always a 3 digit number, e.g. "3" is formatted to "003" and "10" to "010".

Image Added

Setting rules are:

[length(%{00058}) = 1]00%{00058}
[length(%{00058}) = 2]0%{00058}
[true]%{00058}

Note that:

  • %{00058} is the field code for Ephemeral number 1


Finally, the "Approval Code" is composed with an Update issue fields post function.

Image Added

Text to be parsed (in advanced mode) is: %{00061} + "/" + %{10420} + "/" + toUpperCase(substring(%{10421}, 0, 3))

Note that:

  • %{00061} is the field code for Ephermeral string 1

  • %{10420} is the field code for custom text field "Fiscal Year" (this field code might differ on your instance)
  • %{10421} is the field code for custom text field "Department" (this field code might differ on your instance)

In order to keep the "sequenceNumber" in sync, a final Set or create project property post function is added.

Image Added


Once configured, the transition will look like this:

Image Added


Warning

When executing this transition, the custom fields "Fiscal Year" and "Department" must not be empty! Ensuring this can be done by using a validator.

HIER DIE SEITE DANN BITTE AUCH UM JEWEILIGE LÄBELS ERWEITEN!



Other examples of that function

Incoming Links
pageProject Properties
labelsexample



Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label in ("calculated-field","project-properties","post-function")