The need: create a clone with a calculated date field
When creating a task in Jira, you may find yourself wanting to plan when this task must be done exactly. For example, you may want to initialize the Due date field with a specific value sometimes in the future.
The solution: use dynamic date options with Elements Copy & Sync
Thanks to Elements Copy & Sync, you can calculated dates and use them to initialize date fields based on other date fields or based on the time your issue is created. This way, you can insure a consistent and automatic process through all your issue creations.
In this example, we will copy an issue with the key SUP-1. This issue has a Due date field.
This guide explains how to initialize two fields in the copy of SUP-1: "Due date" and "Start date". In order to be compliant with our process, we want the "Start date" of the copied issue to be 2 days after its creation, and the "Due date" to be 3 weeks before the Due date of the original issue SUP-1.
1 - As a Jira administrator, go to the "Elements Copy & Sync Cloud" administration and click on Recipes in the navigation bar.
2 - In the Recipes listing page, select "Escalate ticket" in the Active Recipes list.
3 - In the Recipe configuration page, click on the Content tab.
4 - In the "Fields" section, activate the Set and synchronize fields option. The "Fields mapping options" subsection is displayed.
5 - In the Add target field option, select "Due date", and "Start date", as these are the fields we want to set in the target issue. The fields are added to the table.
6 - On the "Start date" row, click on the "..." button and select the Set dynamic value option.
7 - Click on Insert dynamic value below the field, and use the select list to retrieve the "Current date".
At this point, it means that the Start date field would be initialized with the date of when the recipe will be triggered to copy SUP-1. We want this date to be 2 days later.
8 - Select "2" for the Add offset option and click on the Insert button.
9 - Use the Set dynamic value option in the "Due date" row to do the exact same thing, but this time select the "Due date" field and set the offset to "-3 weeks".
10 - Click on the Insert button again. The two date fields are ready to be dynamically initialized.
11 - Click on the Save button to save the whole recipe.
With this configuration, when a user applies the "Escalate ticket" recipe from issue SUP-1, Copy & Sync will automatically preset the "Start date" and "Due date" fields with dynamic values in the copied issue.
The "Start date" field will be initialized with a date two days in the future, and the "Due date" field will be initialized with a date three weeks before the "Due date" of SUP-1.