Ephemeral date

Issue #41 resolved
Sandro Lehmann created an issue

Hi Fidel

I have the following use case: Project A Project B, linked by Issue to A Project C, linked by Issue to 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'.

Is there another solution?

PS: I could do it vice versa and get the newst date. But that is too late, so it must be triggered on B and C.

Comments (8)

  1. Fidel Castro Armario repo owner

    Hi Sandro,

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

    1.- Use post-function "Read fields from linked issues or subtasks" to get the newest date between issues in project B (or C) and in project A. You will need to check "Read also current issue:" and "highest date". Store the value in an "Ephemeral number" field.

    2.- Use post-function "Write field on linked issues or subtasks" to write the value stored in the "Ephemeral number" field into date field in issue in project A.

    Please, tell me if you attain to implement your requirements with these instructions.

    Fidel.

  2. Fidel Castro Armario repo owner

    Please, reopen the issue if you are not able to implement your requirements with these instructions.

  3. Sandro Lehmann reporter

    Hi Fidel Sorry not for answering yet, but I've been in vacation. Thanks for the answer. 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?

  4. Fidel Castro Armario repo owner

    Yes, you can do it, but you need to use version 2.1.18_beta_4. 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 A:

    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:

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

    read-1.png

    read-2.png

    read-3.png

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

    2.- 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:

    conditional-setting.png

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

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

    write-1.png

    write-2.png

    write-3.png

    Once configured, transition configuration will look like this:

    complete-configuration.png

  5. Sandro Lehmann reporter

    Thanks for the reply. I'll try that out as soon as 2.1.18 is released, 'cause we shouldn't use betas ;-)

  6. Fidel Castro Armario repo owner

    Fixed in recently released version 2.1.18. Please, reopen the issue if you can't implement the proposed solution.

  7. Log in to comment