How to prevent Issues in EPIC from being created again when we try to "re-open" the EPIC from "on-hold" Status

Issue #579 resolved
Dinesh Loyapalli created an issue

I have an EPIC Issue Type.So upon the creation of this EPIC ,other issue types also gets created in this EPIC.Lets say i have an Issue types "ParentProjectItem" which is an epic, Sizing story and Component Story.I have selected components like Data model and ICMP API while creating an epic, then the Issues in EPIC would be i>Sizing Story ii>Data model Component iii>ICMP API Component. We have kept this EPIC issue type on-hold.Now when we try to re-open this , all the issues in EPIC are being created again.So how can we prevent these issues in EPIC from being created once again?

Thanks

Comments (9)

  1. Dinesh Loyapalli reporter

    There are no Post functions in "Re-open" transition. Actually these related issues are being created when we click on "Identify Impacts" transition.So attaching you the post functions that are executed after this transition.Post Functions.PNG

  2. Fidel Castro Armario repo owner

    Hi Dinesh,

    With "Create issues and subtasks" post-function from JIRA Workflow Toolbox it's very easy to prevent issue creation once they are already created. To do it we use parameter Conditional execution.

    The problem is that you are currently creating those issues using a post-function from another plugin. You can implement exactly that same functionality using "Create issues and subtasks" post-function. I can assist you to migrate those post-functions to JIRA Workflow Toolbox. You only have to describe me in detail how your current post-functions behave, and I will give you the exact configuration you need. Then I will add the configuration for preventing the creation of those issues more than once.

  3. Dinesh Loyapalli reporter

    I have three different issue types i>Parent Project Item(EPIC) ii>Sizing story iii>Component story Now when we click on Identify Impacts transition in EPIC workflow, it should create issues for Sizing story and also component story.It has to create multiple component stories depending upon the Components that we have selected while creating the EPIC. Lets say we have selected component1 and component2 while creating the Epic,then the issues in the EPIC should be with the following names:- i>Sizing for "Parent Summary" ii>Component1 Task for "Parent Summary" iii>Component2 Task for "Parent Summary"

    How can this be achieved with JIRA WORKFLOW TOOLBOX?

  4. Fidel Castro Armario repo owner

    You can do it using 2 "Create issues and subtasks" post-function with the following configurations:

    Creating "Sizing story"

    conf-0-0.png conf-0-1.png conf-0-2.png conf-0-3.png

    Parameter "Conditional execution" contains the following boolean expression:

    %{00014} = "Parent Project Item" AND count(filterByIssueType(linkedIssues("is Epic of"), "Sizing Story")) = 0
    

    where %{00014} is field code for Issue type.

    Creating "Component stories"

    conf-1-0.png conf-1-1.png conf-1-2.png conf-1-3.png

    Seed strings expressions is:

    filterByPredicate(toStringList(%{00094}), count(filterByPredicate(fieldValue(%{00000}, linkedIssues("is Epic of")), ^1% ~ ^0%)) = 0) 
    

    where %{00000} is field code for Summary, and %{00094} is field code for Components.

    Let me know if you have any problem with this configurations.

  5. Dinesh Loyapalli reporter

    It has worked perfectly fine.Thank you.Can you please explain me the seed strings expression and also conditional execution?

    %{00014} = "Parent Project Item" AND count(filterByIssueType(linkedIssues("is Epic of"), "Sizing Story")) = 0

    Seed strings expressions is: filterByPredicate(toStringList(%{00094}), count(filterByPredicate(fieldValue(%{00000}, linkedIssues("relates to")), ^1% ~ ^0%)) = 0)

  6. Fidel Castro Armario repo owner

    Hi Dinesh,

    Boolean expression at Conditional execution parameter

    %{00014} = "Parent Project Item" AND count(filterByIssueType(linkedIssues("is Epic of"), "Sizing Story")) = 0
    

    It's used to execute the first post-function only when the following 2 conditions are met:

    1. Issue type is ""Parent Project Item"".
    2. Current issue (i.e., the issue that is executing the post-function), which is an Epic, doesn't have any Sizing Story. Note that "is Epic of" issue links are used by Epic issues to set linkage with their tasks. These issue links are read as "has Epic" from the point of view of the tasks (i.e., Stories, etc).

    Seed string expression

    filterByPredicate(toStringList(%{00094}), count(filterByPredicate(fieldValue(%{00000}, linkedIssues("is Epic of")), ^1% ~ ^0%)) = 0)
    

    That expression returns a string list. Post-function "Create issues and subtasks" creates a new issue for each string returned by the expression. Each of these strings is called a seed string.

    The expression returns a string with the name of each component in current issue which doesn't have a linked issue (using issue link type "is Epic of") whose Summary begins with the name of the component.

    BTW, I have corrected the expression, since I initially used issue link type "relates to", but you should use "is Epic of". I have corrected my first post.

  7. Log in to comment