The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy the Fix versions value from parent to sub Task

Likhita
December 8, 2023

Hi ,

How to copy the Fix version values from parent (specific issue type not for all types) to sub-task ?

Like If I am creating a sub task for a story it should copy the Story Fix versions to sub task , if creating for any other issue type it should copy the value from parent to subtask

Things explore and tried

1. Tried with Copy Value From Other Field (JSU) -> ( Copy field values is working but not able to restrict to specific issue type tried with checking by giving preconditions unfortunately don't have any specific pre-condition that checks the sub task parent issue type

2. Tried with Copy field values [ScriptRunner]->( We can define the sub task parent issue type, But Here the Fix versions field is not showing in the Source Field and Target Field)

3.  We don't have automation.

4. I  have cross-checked all permissions are there

Could anyone please help me in the solution or any other suggestions that i can try it out please let me know.

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 9, 2023

You can use a custom script postfunction in scriptrunner to achieve this.

But I'm not clear on your requirements.

What does the following mean?

If I am creating a sub task for a story it should copy the Story Fix versions to sub task , if creating for any other issue type it should copy the value from parent to subtask

Did you mean "it should NOT copy the value"?

If so, then it's as simple as this:

if(issue.parentObject.issueType.name == 'Story'){
    issue.fixVersions = issue.parentObject.fixVersions
}