Automating a hierarchy
Asked by Jean Francois Gelinas:

\*EDIT The project is not a "JIRA project", but a ticket with a type "project" (like an epic)

Allo !

I've been using automations to create all kind of templates and its great. This morning I have a question for you because i've been looking for an answer for the past 2 days without any success. Here's my situation with a simple expression :

At the creation of a **project A**, I want to create the following template :

* **Task 1**
  * Subtask 1
  * Subtask 2
  * Subtask 3
* **Task 2**
  * Subtask 1
  * Subtask 2
  * Subatask 3

I'm actually unable to use or set the parent link and I don't know the "key" of the project before its actually created. Is there a way to set a the field to "last created project" and link the "tasks" to the poject ? I can set all the others relations (block, dependent, etc) but parent link seems to be missing. Am i confused ?  

Thanks A LOT for your time.


Answers:
author: Jack Brickey
body: Hi [@Jean Francois Gelinas](/t5/user/viewprofilepage/user-id/136768) ,

Can you assess the following example against your requirements?

![2BAD370E-1728-4730-B884-63FDBB73426C.jpeg](https://community.atlassian.com/t5/image/serverpage/image-id/214765iC0A88B8AF2F2D4BF/image-size/large?v=v2&px=999 "2BAD370E-1728-4730-B884-63FDBB73426C.jpeg")

comments: author: Jean Francois Gelinas
body: [@Jack Brickey](/t5/user/viewprofilepage/user-id/901734) Thanks for your answer. However, I have the feeling your are creating tasks in the global "Jira Project" not in the ticket "Project-A".

Example :

**Jira project : Academia**

**Project A** : Deploy local 2203

* **Task 1 : Install network**
  * Subtask 1
  * Subtask 2
  * Subtask 3
* **Task 2 : Install equipment**
  * Subtask 1
  * Subtask 2
  * Subatask 3

**Project B** : deploy local 3303

* **Task 1 : Install network**
  * Subtask 1
  * Subtask 2
  * Subtask 3
* **Task 2: Install equipment**
  * Subtask 1
  * Subtask 2
  * Subatask 3

Your answer create tasks in Acamedia, but I want a parent link between the task and project A or B, which are both 2 tickets.


author: Jack Brickey
body: Hi [@Jean Francois Gelinas](/t5/user/viewprofilepage/user-id/136768) , yes my offering would create two tasks in any newly created project and each task would have two sub tasks. Obviously those details can change.

with that said, in reviewing your response here, I remain a little bit lost. I don't know what you mean by "global project". Also I'm unsure what "ticket "Project-A"" refers too. Is your usage of "Project" here actually an issue within a project?


author: Dan Tombs
body: Hi [@Jean Francois Gelinas](/t5/user/viewprofilepage/user-id/136768)

Assuming your Project A ticket is an epic this is something really easy to do. Follow a similar structure to above but you can simply look for the epic link field the just use Copy from trigger issue.

If you are not using epics then in Jira world, there are no additional hierarchies'. You'll have to use an issue link to represent that hierarchy.

Hopefully this makes sense,

Does this help

comments: author: Jean Francois Gelinas
body: [@Dan Tombs](/t5/user/viewprofilepage/user-id/4172448)

Project A is a ticket, (type = Project), set in advanced roadmap. I can define a "parent link" manually in the ticket. So you are telling me I cannot use this feature with automation unless its an "Epic" ? We use custom hierarchy everywhere.

<https://support.atlassian.com/jira-software-cloud/docs/configure-custom-hierarchy-levels-in-advanced-roadmaps/>