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
width600px


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

Things that will be needed for this 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 by going to via the project settings → Details.

Text to be parsed A valid expression is: {sequenceNumber=0}

Creating

Adding multiple post functions

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

Text to be parsed Name of project property is: sequenceNumberSecond post function is 


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.

Text to be parsed Formula is: {00058} + 1

Note that:

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


The third post function is Formatting the "sequenceNumber" is done with a Set a field as a function of other fieldsThis post function: This ensures that the sequence number is always a 3 digit number. So for example , e.g. "3" get's is formatted to "003" and "10" get's to "010".

Text to be parsed isSetting 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


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

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" (your this field code might be differentdiffer on your instance)
  • %{10421} is the field code for custom text field "Department" (your this field code might be different)
The last post function is 
  • differ on your instance)

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


Once configured, the transition will look like this:

Things to regard


Warning

When executing this transition, the custom fields "Fiscal Year" and "Department" must not be empty!

For checking this a transition validation could be added.For example, both fields can be filled when creating the issue or by adding a screen to the transition

Ensuring this can be done by using a validator.



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")