create sub tasks from issue on transit

Issue #550 resolved
Itamar Ben-Sinai created an issue

Hi I need to create two sub-tasks: 1. first subtask * Summary = Define Specification for <Feature Name> (parent summary name) * assign to Component owner of "Component Architecture"

  1. 2nd task * Define Test plan for <Feature Name> (parent summary name) * assign to Component owner of "QA"

Can you assist? Thanks

Comments (7)

  1. Fidel Castro Armario repo owner

    Hi Itamar,

    Use "Create issues and subtasks" with a configuration similar to this one:

    Captura de pantalla 2017-03-22 a las 12.08.44.png Captura de pantalla 2017-03-22 a las 12.08.58.png

    1) Seed string expression is:

    ["specification", "test_plan"]
    

    2) Summary string expression is:

    getMatchingValue(^%, ["specification", "test_plan"], ["Define Specification for " + %{00000}, "Define Test plan for " + %{00000}])
    

    where %{00000} is field code for summary.

    3) Assignee string expression is:

    getMatchingValue(^% = "specification" ? "Component Architecture" : "QA", toStringList(%{00094}), toStringList(%{00125}))
    

    where %{00094} is field code for Components, and %{00125} is field code for Component leaders.

    I'm assuming that "Component Architecture" and "QA" are the exact names of the 2 components.

    Once configured, the post-function looks like this:

    Captura de pantalla 2017-03-22 a las 12.15.38.png

  2. Itamar Ben-Sinai reporter

    Can we do a separate issue creation?

    create 1 Sub-Task where Summary = "Define Specification for <Feature Name>" (parent summary name) and assignee is the Component Lead of "Component Architecture"

    Create 1 Test Plan issuetype linked with "Requirement Relates to" issue link to the current issue, where summary = "Define Test plan for <Feature Name>" (parent summary name) and assignee is the Component Lead of "QA"

    Sorry for the hassle and Thanks

  3. Fidel Castro Armario repo owner

    Yes, you can use 2 separate post-functions, but please, try the following string list expression for the assignee:

    getMatchingValue(^% = "specification" ? "Component Architecture" : "QA", availableItems(%{00094}), availableItems(%{00125}))
    
  4. Itamar Ben-Sinai reporter

    The problem is that actually i need 1 sub-task, and 1 linked issue, and to my understanding it is one or the other per post function Correct?

  5. Fidel Castro Armario repo owner

    Each post-function can create only one issue type, so you need 2 different post-functions.

    Each post-function will create only one issue, so you don't need to use seed strings, You can compose the summary using basic parsing mode, and inserting field code %{00000} for the parent's summary.

    For the assignee you should use the following string expressions:

    getMatchingValue("Component Architecture", availableItems(%{00094}), availableItems(%{00125}))
    

    and

    getMatchingValue("QA", availableItems(%{00094}), availableItems(%{00125}))
    
  6. Log in to comment