---
# System prepended metadata

title: '[CD-10740](https://ateliere.atlassian.net/browse/CD-10740) - [BE] Package Template: parent referencing'

---

# [CD-10740](https://ateliere.atlassian.net/browse/CD-10740) - [BE] Package Template: parent referencing

- [x] Check that the toggle for the parent selecting is present and working
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Check that the toggle is present and working

- [x] Check the tooltip is present and the information is relevent, when the parent toggle is enable
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    5. Check the tooltip is present and the information is relevent

- [x] Check that not pressing the parent toggle the user can select any input file tag from title used for the job
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Do not toggle the parent button
    5. Select any tag in the Input file tag

- [x] Check that the user can select the any parent from the hierarchy
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter any number in the parent field

- [x] Check that the parent is seen in the read mode deliverable
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter a parent number
    6. Complete the rest of the mandatory fiels and save the deliverable
    7. Look if the parent is present in the read mode

- [x] Check that the user can select the input file tag from the parent that was selected 
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter a parent number
    6. Look at the input file tag
    7. Select a tag that is on that parent

- [x] Check that the user can create more delivarable, in the package templates, with input file tag from more parents
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter a parent number 
    6. Complete all the mandatory fields and save
    7. Repete the same steps for a different parent
    8. See if the user can create different delivereables with different parents

- [x] Check that the deliverable are working as intended and the package is created and delivered
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file for a parent 
    3. Create a job base on the above package
    4. Go to the job page
    5. Run the job
    6. Look if the job is run and the user can deliver the package

- [x] Check the job if the user select a parent higher that maxim the parent from the hierarchy - Error on the job
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file from a parent that is higher than the maxim parent from the hiera
    3. Create a job base on the above package
    4. Go to the job page
    5. Look if the right error is shown: "The following title(s) do not have a parent in its hierarchy"

- [x] Check the job returns the right error, if the user doesn't attached o file on a parent that is reference in the templates package
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file from a parent 
        2.1 make sure that on that parent the user didn't attach any file
    3. Create a job base on the above package
    4. Go to the job page
    5. Look if the right error is shown: "Error fetching the file associated with the following tag(s)"

- [x] Check the job returns the right error, if the user doesn't attached the tag on the file that is reference in the template package
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file from a parent 
        2.1 Make sure that on that parent the user didn't attach any tag on the file
    3. Create a job base on the above package
    4. Go to the job page
    5. Look if the right error is shown: "Error fetching the file associated with the following tag(s)"

- [x] Check the job return the right error, if a parent is deleted
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file for a parent 
    3. Create a job base on the above package
    4. Go to the job page 
    5. Look if there is any error present
    6. Go and delete any parent from the hierarcy
    7. Return and save the job
    8. Notice that a the error "The following title(s) do not have a parent in its hierarchy" is present

______

  **Staging**
    
 - [x] Check that the toggle for the parent selecting is present and working
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Check that the toggle is present and working

- [x] Check the tooltip is present and the information is relevent, when the parent toggle is enable
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    5. Check the tooltip is present and the information is relevent

- [x] Check that not pressing the parent toggle the user can select any input file tag from title used for the job
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Do not toggle the parent button
    5. Select any tag in the Input file tag

- [x] Check that the user can select the any parent from the hierarchy
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter any number in the parent field

- [x] Check that the parent is seen in the read mode deliverable
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter a parent number
    6. Complete the rest of the mandatory fiels and save the deliverable
    7. Look if the parent is present in the read mode

- [x] Check that the user can select the input file tag from the parent that was selected 
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter a parent number
    6. Look at the input file tag
    7. Select a tag that is on that parent

- [x] Check that the user can create more delivarable, in the package templates, with input file tag from more parents
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable
    3. Select File
    4. Toggle the button for parents
    5. Enter a parent number 
    6. Complete all the mandatory fields and save
    7. Repete the same steps for a different parent
    8. See if the user can create different delivereables with different parents

- [x] Check that the deliverable are working as intended and the package is created and delivered
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file for a parent 
    3. Create a job base on the above package
    4. Go to the job page
    5. Run the job
    6. Look if the job is run and the user can deliver the package

- [x] Check the job if the user select a parent higher that maxim the parent from the hierarchy - Error on the job
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file from a parent that is higher than the maxim parent from the hiera
    3. Create a job base on the above package
    4. Go to the job page
    5. Look if the right error is shown: "The following title(s) do not have a parent in its hierarchy"

- [x] Check the job returns the right error, if the user doesn't attached o file on a parent that is reference in the templates package
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file from a parent 
        2.1 make sure that on that parent the user didn't attach any file
    3. Create a job base on the above package
    4. Go to the job page
    5. Look if the right error is shown: "Error fetching the file associated with the following tag(s)"

- [x] Check the job returns the right error, if the user doesn't attached the tag on the file that is reference in the template package
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file from a parent 
        2.1 Make sure that on that parent the user didn't attach any tag on the file
    3. Create a job base on the above package
    4. Go to the job page
    5. Look if the right error is shown: "Error fetching the file associated with the following tag(s)"

- [x] Check the job return the right error, if a parent is deleted
  - Steps:
    1. Create a new templates pack
    2. Create a new deliverable with a file for a parent 
    3. Create a job base on the above package
    4. Go to the job page 
    5. Look if there is any error present
    6. Go and delete any parent from the hierarcy
    7. Return and save the job
    8. Notice that a the error "The following title(s) do not have a parent in its hierarchy" is present
   




