Auto subtask transition based on custom field

Issue #309 resolved
Chris created an issue

Hi Fidel,

First I will explain my current setup. I have 4 projects. 1 Task type and 10 subtasks. All of these projects use this structure and all of the subtasks. The Parent task will auto transition as certain subtasks are completed.

However I now have a requirement in one project to follow a different process for tasks belonging to "New" functionality and to the "CEP" program. The new process is now 4 subtasks instead of the 10. Note that this project will continue to use the original process for some of the tasks.

This is the original code for my subtasks: [%{Issue type} in ["SSD", "Build & UT", "UTCR", "Code Review"] AND count(filterByPredicate(siblingSubtasks(), ^%{Issue type} in ["Low Level Design", "SSD", "Build & UT", "UTCR", "Code Review"] AND ^%{Issue status} != "Complete")) = 0]Ready For Test [%{Issue type} in ["Test", "TCOE TCR"] AND count(filterByPredicate(siblingSubtasks(), ^%{Issue type} in ["Test", "TCOE TCR"] AND ^%{Issue status} != "Complete")) = 0]Ready For Deployment il(Deploy)Deployed il(PRISM)Complete

I think I require two different sets of this code but with a condition to trigger one or the other depending on if the Parent tasks is "New" or "Legacy" functionality and belongs to the "CEP" Program?

Comments (9)

  1. Fidel Castro Armario repo owner

    Hi Chris,

    Some questions:

    1. "New" and "Legacy" are options of a custom field called functionality?

    2. "CEP" is an option a custom field called program?

    3. Old process uses the following issue types: "SSD", "Build & UT", "UTCR", "Code Review", "Low Level Design", "Build & UT", "UTCR", "Code Review", "Deploy" and "PRISM". Which are the issue types of the new process?

    4. Which status do you want to move parent issue for each of these statuses?

  2. Chris reporter
    1. Correct
    2. Correct
    3. The 10 Subtask types are: HLD, LLD, SSD, Build & UT, Code Review, UTCR, Test, TCOE TCR, Deploy and PRISM. Subtasks only required from new process are: HLD, LLD, SSD, Code Review, Deploy and PRISM. (Sorry there are 6, not 4)
    4. After HLD > Design Review Complete. Then when LLD, SSD, Code Review complete > Development Review Complete > Ready for Deployment (From Existing workflow)
  3. Fidel Castro Armario repo owner

    Sorry Chris, but I don't understand your answer number 4.

    Please answer question 4 using sentences with the following structure:

    For subtask A, B, C, when all the sibling subtasks D, E, F are in status X then move parent issue to status Y.

    where A, B, C, D, E, F are issue types, and X and Y are statuses.

  4. Chris reporter

    At the moment I have one Interface Tasks with 10 Subtasks: HLD LLD SSD Build & UT Code Review UTCR Test TCOE TCR Deploy PRISM

    Parent status auto transitions are as follows: When HLD is initiated the parent moves to “In Design”. When HLD is complete the parent moves to “Ready for Development”. When LLD initiates the parent moved to “In Development”. When LLD, SSD, Build & UT, Code Review and UTCR are complete, the parent moves to “Ready for Test” When Test is initiated the parent moves to “In Test”. When Test and TCOE TCR are complete the parent moves to “Ready for Deployment”. When Deploy is complete the parent moves to “Deployed”. When PRISM is initiated the parent moves to “In PRISM”. When PRISM is complete the parent moves to “Complete”.

    I would like to keep this behaviour, but also in addition to this I would like to do the following:

    When an Interface Task only has the following 6 subtasks:

    HLD LLD SSD Code Review Deploy PRISM

    I would like to follow auto transitions only to fire if the Interface issue type have “New” in the “Functionality” custom field and “CEP” in the “Program” custom field. If this is not true I would like it to follow the original 10 subtask path above:

    When HLD, LLD, SSD are complete the parent moves to “Ready For Development”. When Code Review is complete the parent moves to “Ready for Deployment”. When Deploy is complete the parent moves to “Deployed”. When PRISM is initiated the parent moves to “In PRISM”. When PRISM is complete the parent moves to “Complete”.

  5. Fidel Castro Armario repo owner

    Use "Set a field as a function of other fields" with the following setting rules:

    [%{aaaaa} = "New" AND %{bbbbb} = "CEP" AND %{00014} in ["HLD", "LLD", "SSD"] AND count(filterByPredicate(siblingSubtasks(), ^%{00014} in ["HLD", "LLD", "SSD"] AND ^%{Issue status} != "Complete")) = 0]Ready For Development
    [%{aaaaa} = "New" AND %{bbbbb} = "CEP" AND %{00014} in ["Code Review"] AND count(filterByPredicate(siblingSubtasks(), ^%{00014} in ["Code Review"] AND ^%{Issue status} != "Complete")) = 0]Ready for Deployment
    [%{aaaaa} = "New" AND %{bbbbb} = "CEP" AND %{00014} in ["PRISM"]]In PRISM
    [%{00014} in ["SSD", "Build & UT", "UTCR", "Code Review"] AND count(filterByPredicate(siblingSubtasks(), ^%{00014} in ["Low Level Design", "SSD", "Build & UT", "UTCR", "Code Review"] AND ^%{Issue status} != "Complete")) = 0]Ready For Test
    [%{00014} in ["Test", "TCOE TCR"] AND count(filterByPredicate(siblingSubtasks(), ^%{00014} in ["Test", "TCOE TCR"] AND ^%{Issue status} != "Complete")) = 0]Ready For Deployment
    il(Deploy)Deployed
    il(PRISM)Complete
    

    replacing aaaaa and bbbbb with "Functionality" and "Program" field codes respectively

  6. Log in to comment