Copy value of one custom field into another using a post function at the time of issue creation

Sarabjeetk July 8, 2019

I have two custom date fields  actual date and initial date, i want to copy the date from Actual date into Initial field when an issue is created,

How can i write a post-function for it, i have tried copy one field value into another in post function but its not working??

1 answer

1 vote
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 9, 2019

Hello Sarabjeet,

If you are using JIRA Cloud, you can use the Copy Value From Other Field post function to copy the value from the Actual field to the Initial field if both are of the same type (Both custom date pickers).

These would be the steps:

- Navigate to your project > Project Settings > Workflow > Click to Edit the relevant workflow

- On Diagram Mode, click in the Create transition of the workflow > Click on Post Functions:

Screen Shot 2019-07-09 at 18.29.01.png

- Click to Add Post function > Select the Copy Value From Other Field, configuring it to copy the value from Actual date in the Initial Date:

Screen Shot 2019-07-09 at 18.29.29.png

- Save the workflow draft

If you are using JIRA Server, you can use the add-on JIRA Suite utilities to perform the same steps as in JIRA Cloud.

Let me know if the steps above worked for you.

Sarabjeetk July 10, 2019

Hi, I tried the same steps hopefully.

I made changes in the workflow added a post function and than publish workflow and its was linked to the project.

I hope its correct but it is not working for me or i missed something

 

And additionally one more thing how can i add a counter so everytime the date changes counter is set from 0-1-2....Capture.PNGCapture1.PNG

Shua November 15, 2021

@Petter Gonçalves 

For JIRA Cloud,

When copying a field from a Story Issue to its Parent Epic, will the field be overwritten if there is content present? Or will it add it to the bottom of what is already there? 

Ideally, if I have 5 linked issues to my Epic, when completing each issue, have its results copied to the epic but to not overwrite the subsequent issue when it is eventually completed. 

Suggestions?

Thanks in advanced.

Adolfo satdp May 30, 2022

Hi.

Sorry, but, if I copy the value of the custom field at component at post function, the workflow fail if the component was not created before.

Samuel Stephens November 3, 2022

Hi @Petter Gonçalves

I'm assuming a similar solution is also available for Jira Data Centre?

I have ScriptRunner in my DC environment and it looks as if I can achieve a similar outcome by using a 'Copy field values' post function.

Are you aware of any other native functions within Data Centre that may be able to inherit a field from a parent or would ScriptRunner be my only option?

Thanks!

Suggest an answer

Log in or Sign up to answer