Ephemeral date
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)
-
repo owner -
repo owner - changed status to resolved
Please, reopen the issue if you are not able to implement your requirements with these instructions.
-
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?
-
reporter - changed status to open
-
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:
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:
- {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:
Once configured, transition configuration will look like this:
-
reporter Thanks for the reply. I'll try that out as soon as 2.1.18 is released, 'cause we shouldn't use betas ;-)
-
repo owner - changed status to resolved
Fixed in recently released version 2.1.18. Please, reopen the issue if you can't implement the proposed solution.
-
reporter It worked very well! THX
- Log in to comment
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.