You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
-I have been working in JIRA cloud for about a month.
-No programming experience.
-I am looking for options other than a add-on but i am still open to a add-on.
I believe this is what you're looking for: How to Automatically Map Fields of a Parent Ticket to a New Sub-Task in JIRA Cloud. Although it does require JIRA Misc Workflow Extensions and once you've enabled it you would do the following:
Hopefully this helps.
I am trying to have the sub-task created with the same status as parent. I tried both of the below but the sub-task is still being created with 'New' status when I create one.
I tried to add the post-function 'Copy field value from parent issue (JMWE add-on)' [Set the value(s) of a field to the value of the same field in the parent issue] but this does not have Status field.
I have also tried to add a post function 'Copy Value From Other Field' to copy the status field from parent to sub-task which didn't work either.
How do I achieve this?
Jira, and especially Jira Cloud, will not let you set an issue's status. The only way to change an issue's status is through transitions.
You can trigger transitions using the "Transition Current Issue" or "Transition Linked Issues" post-functions. What you cannot do (or should generally not do, on Jira Server) is modify the Status field directly.
However, on Jira Server, you actually can set the Status field, if you're cautious. You need to use the Scripted (Groovy) post-function with the following script:
So, I've tried this.
It basically makes the sub-task to have any one of the transitions predefined? I have to select the transition to-do/inprogress etc when I choose this post-function 'Transition linked issues'.
But What I need here is not the subtask to have some pre-defined status but instead inherit the status of its parent when its created. The status of the parent when the sub-task is created on it might be either one of to-do, inprogress etc. But this post-function instead asks me to select a transition which is not desirable for me. Or am I not doing it right?
As I mentioned in my previous post, in that case, try the second approach, based on the Scripted (Groovy) post-function.
The script you posted showed errors when I entered it under Custom Script post-function. So, I've modified it to the below and it shows no errors on the script window.
But the sub-task still doesn't get the status of the parent though it shows a green tick whenever I add sub-tasks here. Pls see screenshot attached.
This is not a JMWE Scripted (Groovy) post-function - this is a ScriptRunner post-function. This is why it doesn't work.
You could use an automation rule to do this [Note that I did this for a single company managed project and have not rolled it out globally, but theoretically it should work globally too].
Go to project settings > hit automation > make sure your in the project you want to test the rule in > on the right hand of the screen click the blue create rule button.
From there your going to create the following:
[Trigger] When an issue is created,
[Condition] If the issue type is a sub-task,
[New Action] Then: Edit issue fields "Assignee" (in this one make sure to choose copy from parent)
Hit Save. Then publish the rule.
This won't update previously created sub-tasks, but it will work for newly created ones.
We started out there to solve this, with Automations, but now the new limits placed on Automations as of 1 Nov 2023 are so low that with just a couple hundred users Automations reach their monthly limits in about a week and they are now unusable for us.
I think I found another way around that. If your Epics, Standard Issue tickets (Tasks, Stories, etc.) and sub-tasks all use the same workflow, then I do not believe this will work / it may cause errors in other parts of your process.
However, if your sub-tasks have a unique workflow then you can set a "post function" when a ticket is "opened" to copy the assignee from the parent. Note 2 things:
How you would do this: