Forums

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

Copy subtask statuses into parent issue

Musku Nagaraju
Contributor
June 13, 2019

Hi Team,

 

I need a field in Parent issue view screen like "Subtask statuses ", this should be copy all subtask statuses.

Can you help me the right code ? 

Thanks

Nagaraju

 

2 answers

0 votes
Musku Nagaraju
Contributor
June 13, 2019

Hi Team,

Can anyone help me on coding how to achieve this.

0 votes
Tarun Sapra
Community Champion
June 13, 2019

Hello @Musku Nagaraju 

When you say - "this should be copy all subtask statuses" , do you mean the field should have the currently statuses of all the sub-tasks?

And if that's the case then you can have a scripted text field which can contain comma separated aggregation of the statuses of all the sub-tasks

Tarun Sapra
Community Champion
June 13, 2019

If the scripted field you just need to fetch the subtaskObjects and aggregated and return their statuses which should be pretty straight-forward.

https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/issue/Issue.html#getSubTaskObjects--

Musku Nagaraju
Contributor
June 13, 2019

Yes @Tarun Sapra ,

I need a help of code to achieve this.

Thanks

Nagaraju 

Tarun Sapra
Community Champion
June 13, 2019

Hello @Musku Nagaraju 

There are plenty of script runner examples available on this portal for scripted fields. And also in the ScriptRunner documentation.

Suggest an answer

Log in or Sign up to answer