Versions Compared

Key

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


Section


Column
width30%600px


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

Table of Contents
maxLevel1



Column




Example: Copy "Due date" into a date type custom field in a linked issue if it's greater than current issue's "Due date"

I have the following use case: Project A & Project B are linked by issues to a Project C. Project C is linked by issues to Project A. First setting a date on B a date field of A must be set. Then when setting a date on C it must update the date on A if its date is newer. I thought first of copying within a transaction of B the date from A to an Ephemeral field and compare then the both dates. But there is no such field like 'Ephemeral Date'.

"Ephemeral number fields" can be used to store Date and Date-Time fields, since this kind of fields contain the number of milliseconds elapsed from 1/1/1970.

You can implement your requirements as I explain:


The checkbox "Read also current issue:" does not work, because the field in Project A is named different as the fields in Project B and C. Is there a solution to compare two dates and setting the desired one?


Yes, you can do it, I'm going to explain what you have to implement in the workflow used by project B (for project C is exactly the same solution except for the name of the field). You don't have to do anything in the workflow used by project

Let's suppose that:

  • Issue in project B is linked to issue in project A by a link of type "blocks", i.e., issue in project B blocks issue in project A
  • Field in project A is called "My Date" and field in project B is "Due date".

The solution is as follows:

Use post-function Read fields from linked issues or sub-tasks to read the date field "My Date" in project A and store it in "Ephemeral number 1" in project B:

Image Removed

Image Removed

Image AddedImage AddedImage Added

 Image Removed

I'm supposing that you are reading only from one issue in project A, so it has no effect the option you select in parameter "Value to write in target field...". In the example I selected "lowest date".

Use post-function Set a field as a function of other fields to set "Ephemeral number 1" with newer date between "Ephemeral number 1" and "Due date". You should consider the cases where only "Ephemeral number 1" or only "Due date" are set:

Image Removed

Text to be parsed is:

[{00058} != null AND {00012} != null] max({00058}, {00012})
[{00058} != null]{00058}
[{00012} != null]{00012}


Image Added


Note that:

  • {00058} is field code for "for Ephemeral number 1"
  • {00012} is field code for "for Due date"

Use post-function Write field on linked issues or sub-tasks to write "Ephemeral number 1" in project B into field "My Date" in project A:


Image RemovedImage AddedImage AddedImage Added

Image Removed 

Image Removed

Once configured, transition configuration will look like this:

 

Image AddedImage Removed



Other examples of that functions

Read fields from linked issues or sub-tasks

Incoming Links
pageRead fields from linked issues or sub-tasks
labelsexample



Write field on linked issues or sub-tasks

Incoming Links
pageWrite field on linked issues or sub-tasks
labelsexample



Set a field as a function of other fields

Incoming Links
pageSet a field as a function of other fields
labelsexample



Related Usage Examples

Content by Label
showSpacefalse
cqllabel = "example" and label in ("custom-field","issue-links")