Create recurrent sub-task under a specific story
Asked by Alvaro Landin:

Good afternoon,

I am trying to create a couple of recurrent sub-tasks that will be scheduled at the start of next month (on a monthly basis and on a quarterly basis depending on the task).

I am not being able to create the automation rule locating the sub-task under the desired story.

This is what I have by now. I don't find how to locate where I want the sub-task.

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/279928i76B182095C7EAA7D/image-size/large?v=v2&px=999 "Capture.PNG")

Kind regards,

Alvaro


Answers:
author: Jack Brickey
body: Hi [@Alvaro Landin](/t5/user/viewprofilepage/user-id/5313603) , in your rule above could you share the details of the create action? Is the parent static (always the same? What error is presented in the audit log?

comments: author: Alvaro Landin
body: Hi Jack,

Sure, please find it below.

![Capture2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/279940iF2028A5E4BBB5592/image-size/large?v=v2&px=999 "Capture2.PNG")

Yes, indeed. It is a static parent (a story).

The error I found is the following:

![Capt.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/279944i87A6EC528223BCFE/image-size/large?v=v2&px=999 "Capt.PNG")

Apart from that, I still cannot find how to locate the recurrent issue where I want.

Kind regards,

Alvaro


author: Jack Brickey
body: Thanks for the screenshot. As I suspected, you're not correctly identifying the parent. It appears you are selecting "current issue" when the trigger is a scheduled event. You can only use current issue if it is defined within the context of the rule. Such as what triggered the rule. If, indeed, this is a static parent, then simply define the issue by the issue key where you have "current issue". Type the key and then select what is presented as issue abc-xxx.

example...

![IMG_2579.jpeg](https://community.atlassian.com/t5/image/serverpage/image-id/279947iC75DE854DA836AAE/image-size/large?v=v2&px=999 "IMG_2579.jpeg")


author: Alvaro Landin
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) again for the response,

However, I tried to include my parent issue code in the Parent Issue field and it was impossible to save it. Each time I type it a message saying "No options" appears.

![Capture3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280075iEFA4E1CA5BA1A39C/image-size/large?v=v2&px=999 "Capture3.PNG")

Do you know why could be this happening?

Kind regards,

Alvaro


author: Alvaro Landin
body: HI [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) again,

I have changed a bit the scenario creating a story (instead of a sub-task). In this case, by using the epic link field, I have been able to create it under the desired epic. However, still not able to locate sub-tasks under a story, as it is what I really need.

In case this clarifies something.

Kind regards,

Alvaro


author: Jack Brickey
body: Might I see a screenshot of RMP1MD-389? Also please verify that the rule is indeed under the RMP1MD project. Can you verify that you can manually add a subtask under RMP1MD-389? It would be interesting to see if you can attempt using a different issue as the parent.


author: Alvaro Landin
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) ,

Yes, indeed. I can include sub-tasks under RMP1MD-389.

Find also below screenshot of RMP1MD-389.

![Capture6.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280400iC91403D800F7FDEF/image-size/large?v=v2&px=999 "Capture6.PNG")

I still don't know to locate it under a specific story, just under an epic with Epic link field.

Thanks in advance,

Alvaro


author: Jack Brickey
body: Hi [@Alvaro Landin](/t5/user/viewprofilepage/user-id/5313603) , I am unsure why you do not see the issue as an option in the drop-down. In my test, as soon as I start typing the project key I see "Issue xxx..." pop up. Completing the entry I then select it in the drop-down.

have you attempted using the variable Idea offered by Joseph. It seems you did not follow through with it? I would be interested in the results.


author: Alvaro Landin
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739) ,

I was just trying to use Joseph's proposal.

I have included what you told me. However I am still receiving this error message.

![Capture7.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280448iD853DACBB236700E/image-size/large?v=v2&px=999 "Capture7.PNG")

It seems that the error comes from the audit log action. Please see below how is the rule built. Not really sure why it say it cannot find the issue.

![Capture9.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280443iD2E1551DB29A67FA/image-size/large?v=v2&px=999 "Capture9.PNG")

Thanks in advance!


author: Jack Brickey
body: This has me scratching my head here. I assume that you have {{myParrentIssue}} in the parent field of the create subtask issue. It seems that Automation cannot find the issue. One thing to check, though, I'm quite confident this is not the case, is the permissions for your project to ensure that automation has the appropriate permissions, browse and create.

another idea, if you're so inclined, is to use another project and create a similar rule. The main thing I want to verify is that you can reference a parent using the issue Key when creating a subtask. Another idea would be to change your current rule to a manual trigger. Then set the parent to the triggering issue. Run the rule from the specific issue. We are dealing with here. Again, all of these are just attempts to try to figure out what might be going on.


author: Alvaro Landin
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) ,

Okay, so I tried the exact same rule in another project an it works as I want.

The problem is that I need it in the other project LOL.

Do you know which could be the reason of this happening?

Kind regards,

Alvaro


author: Jack Brickey
body: Well, at least we know it can work. I would check the permissions comparing them between the two projects to see if anything pops out. Also, can I assume that both of these projects are company managed software projects or at least the same type of project?


author: Alvaro Landin
body: Yes, they should be the same both of them.

Do you need me to give some information about them?

Kind regards,


author: Jack Brickey
body: Also, do you check a different issue as the parent in the project that is not working just to rule out the possibility of an issue specific problem. Though I'm pretty confident that's not it. I think it is a project specific issue here.


author: Alvaro Landin
body: Okay, I think it's solved!! I realized when trying the rule in the new project I skipped including while creating the new issue the epic link field.

Now I have tried it with the proper parent link and it seems to work nicely.

So it seems that was the problem, including also the Epic link field in the create issue action inside the rule.

Now it's a matter of waiting for the beginning of the month to see if it runs properly by itself but at least when I run it now it works as I was expecting!!

Many thanks both [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) and [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739) .

Really appreciated!!


author: Jack Brickey
body: Ah!! Yes! Great that you got it working!


author: Joseph Chung Yin
body: [@Alvaro Landin](/t5/user/viewprofilepage/user-id/5313603) -

Using automation rule is the way to handle your ask, however you will have to be able to identify which parent task that you need the recurring subtask(s) on a schedule based trigger.

It is important that you need to determine what are the criteria of your parent task that needs the subtasks. So, I would recommend that you take a step back to figure that out first. Once you have done so, then you can use automation rule to complete your process.

Without determining which parent task(s), then the rule is not going to helped you.

Hope this helps.

est, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

comments: author: Alvaro Landin
body: Hi [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739)

I do know which is the parent task I want to link to.

However, I do not know how to locate the recurrent task where I want. It is a static parent, if that helps.

Let me know!


author: Joseph Chung Yin
body: [@Alvaro Landin](/t5/user/viewprofilepage/user-id/5313603) -

In addition to what [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) suggested, you can also experiment with using local variable where you can specified your parent (static issuekey), then you can refer to the local variable in the Create Issue Action -

![2023-09-11_9-23-39.png](https://community.atlassian.com/t5/image/serverpage/image-id/279954i92EA2D9BBA2D50A5/image-size/large?v=v2&px=999 "2023-09-11_9-23-39.png")

Hope this also helps.

Best, Joseph


author: Alvaro Landin
body: HI [@Joseph Chung Yin](/t5/user/viewprofilepage/user-id/396739) ,

Thanks for the alternative solution. However, I still find some errors while using this solution. I have defined it like in the picture below.

![Capture4.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/280076i323E0B71AB45C8C5/image-size/large?v=v2&px=999 "Capture4.PNG")

Additionally, with his solution, how the rule know which should be the parent issue?

Kind regards,

Alvaro


author: Joseph Chung Yin
body: [@Alvaro Landin](/t5/user/viewprofilepage/user-id/5313603) -

In the Create variable action, you will need to provide the issuekey of the desired parent issue.

![2023-09-12_8-12-24.png](https://community.atlassian.com/t5/image/serverpage/image-id/280215i34DE3180A583CDB3/image-size/large?v=v2&px=999 "2023-09-12_8-12-24.png")

Since you mentioned that your parent issue is always the same.

Best, Joseph


Tags: advanced-roadmaps

jira-software-cloud

jira-software-server

unknown-hosting-type