Features used to implement the example
- Read fields from linked issues or sub-tasks
- Write field on linked issues or sub-tasks
- Set a field as a function of other fields
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:
- Use post-function Read fields from linked issues or sub-tasks 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.
- Use post-function Write field on linked issues or sub-tasks to write the value stored in the "Ephemeral number" field into date field in issue in project A.
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:
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:
Note that:
- {00058} is field code for Ephemeral number 1
- {00012} is field code 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:
Once configured, transition configuration will look like this:
Other examples of that functions
Read fields from linked issues or sub-tasks
- Add all assignees of certain sub-task types to a "Multi-User Picker" custom field
- Add and remove a single or a set of items from multi valued fields
- Copy "Due date" into a date type custom field in a linked issue if it's greater than current issue's "Due date"
- Copy attachments from one issue to another
- Make an issue inherit highest priority among those of linked issues
- Propagate highest priority from blocked issues to blocking issues
- Sum sub-task's "Time Spent" (work logs) and add it to a certain linked issue
Write field on linked issues or sub-tasks
- Add and remove a single or a set of items from multi valued fields
- Automatically become watcher of every issue blocking an issue assigned to you
- Automatically close resolved sub-tasks when parent issue is closed
- Automatically resolve an epic when all its stories are resolved
- Compose dynamic text by inserting field values in a text template
- Copy "Due date" into a date type custom field in a linked issue if it's greater than current issue's "Due date"
- Copy attachments from one issue to another
- Create a comment in sub-tasks when parent transitions
- Creating a Jira Service Desk internal comment
- Creating a Jira Service Desk internal comment on linked issues
- Execute transition in epic
- Make linked issues, sub-tasks and JQL selected issues progress through its workflows
- Moving sub-tasks to "Open" status when parent issue moves to "In Progress"
- Sum sub-task's "Time Spent" (work logs) and add it to a certain linked issue
- Transition sub-tasks when parent is transitioned
Set a field as a function of other fields
- Add watcher depending on security level
- Add watchers based on issue type
- Add watchers depending on the value of a custom field
- Assign issue based on the value of a Cascading Select custom field
- Assign issue to a specific user based on a specific custom field value
- Assign issue to current user if assignee is empty
- Assign issue to current user if the user is not member of a certain project role
- Change assignee based on a custom field
- Change parent's status depending on sub-task's summary
- Changing issue priority depending on issue description
- Compose dynamic text by inserting field values in a text template
- Copy "Due date" into a date type custom field in a linked issue if it's greater than current issue's "Due date"
- Limit the number of hours a user can log per day
- Make parent issue progress through its workflow
- Rise priority if due date is less than 3 weeks away
- Set "Due date" depending on the value of other fields, in case it's uninitialized
- Set "Due date" to a specific day of next week no matter of date of creation this week
- Set "Due date" to current date at issue creation if not initialized
- Set a custom field "Urgency" depending on a combined value of issue's priority and "Impact" custom field
- Set a date based on current date
- Set a field based on reporter's email
- Set a watcher at ticket creation depending on custom field's value
- Set assignee depending on issue type
- Set security level based on groups and project roles the reporter or creator are in
- Set security level depending on reporter or creator
- Set the assignee based on a condition
- Set the value of a field of type "User Picker" depending on other field's value
- Set watchers depending on the value of a custom field
- Setting a custom field (User Picker) based on the value of another custom field (Text Field)
- Setting a field's default value depending on another field
- Setting the priority depending on the multiplication of custom fields
- Transition an issue automatically depending on the value of a field
- Unassign an issue when assigned to project leader
- Update checkboxes custom field if a file has been attached during a transition
- Using project properties to calculate custom sequence numbers