How to reflect the changes in the Stories when we add or remove component from the EPIC?

Issue #639 resolved
Dinesh Loyapalli created an issue

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

Sizing for "Parent Summary"(Sizing Story):- Sizing story, it takes the same components that we have selected in EPIC and it creates the subtasks based on the components we selected.The names of these sub-tasks are:- i>Component1 Sizing for "Parent Summary" ii>Component2 Sizing for "Parent Summary"

We have also linked Component story with the respective Sizing sub-tasks https://bitbucket.org/fcarmario/jira-workflow-toolbox/issues/594/how-to-link-the-subtask-issuetype-of

Now if we came to know that the component is not impacted and if we have removed it from the epic, then the status for the component story that is being created initially should be canceled or not impacted and also the respective Sizing sub-task that we have linked with the component story should also be canceled or not impacted.Can this be Achieved?

Comments (31)

  1. Fidel Castro Armario repo owner

    Hi @DineshLoyapalli,

    To do it we have to prevent Components from being edited using the ordinary way, i.e., in the edit screen, but using a reflexive transition (e.g. called "Edit Components") that we will use to execute the post-function for transitioning the non-impacted.

    Is the described restriction acceptable for you?

  2. Dinesh Loyapalli reporter

    We should be able to select the multiple components at a time.Can we do that if we make them non-Editable?

    Here is the component field Components field.PNG

  3. Fidel Castro Armario repo owner

    Yes, you can. The way to do it is as described:

    1. Remove Components from EDIT screen.
    2. Create a screen called "Screen for editing Components", and add to it field Components.
    3. Create a global reflexive transition called "Edit Components". Global transitions are available from any status in the workflow (anyway you can restrict them using a condition if you need to), and reflexive transitions don't change status, since they have the same status as origin and destination. These kind of transitions are created like shown in the following screenshot: global-reflexive-transition.png
    4. Associate screen "Screen for editing Components" to transition "Edit Components".

    Once, you have done it I will explain which post-function do you have to include in it.

  4. Dinesh Loyapalli reporter

    I have created the screen and also the Global transition and associated the screen with the transition.

  5. Fidel Castro Armario repo owner

    Some question:

    1. You will be editing the Components field on Epic issue. Is it ok?
    2. Cancelling the Story and the Sizing sub-tasks is to execute a transition on those issues in order to move them to Cancelled status. Is it ok?
  6. Fidel Castro Armario repo owner

    Add to transition "Edit Components" post-function "Write field on issues returned by JQL Query or Issue List" with the following configuration:

    Captura de pantalla 2017-06-07 a las 0.05.38.png

    Issue list expression is:

    filterByPredicate(linkedIssues("is Epic of") UNION subtasks(), ^%{00094} not in %{00094})
    

    where %{00094} is field code for Components.

    Note that a transition from current status to Cancelled should exist in the the workflows of Story and Sizing subtask. The conditions and validations in those transition should be satisfied.

  7. Dinesh Loyapalli reporter

    okay.we don't have Cancelled status in story and the sizing sub-task.I will create Cancelled Status First and then will add the post function you have mentioned above.

  8. Dinesh Loyapalli reporter

    Error.PNG

    Getting this error when i tried to delete the component..Initially i selected 2 components Doc Types, ICMP IM.

  9. Fidel Castro Armario repo owner

    Try selecting "Issue status (delayed writing)" as target field, instead of "Issue status".

  10. Dinesh Loyapalli reporter

    The status of the Component story has changed to cancelled if we remove the components from EPIC.We also have Sizing story which takes all the components from the EPIC and creates the sub-tasks for all the components selected.Now the status of the sub-task should also be changed to Cancelled if we remove a Component from the EPIC.

    We have also created a Link between Component Story and the Respective Sizing Sub-task.Please find the below link https://bitbucket.org/fcarmario/jira-workflow-toolbox/issues/594/how-to-link-the-subtask-issuetype-of

    Sizing story does not have a Cancelled status but eh sub-task in the sizing story has Cancelled status.We have to change the sizing sub-task status to cancel..

  11. Fidel Castro Armario repo owner

    Hi @DineshLoyapalli,

    Sorry, I made a mistake in my issue list expression. Use the following one instead:

    filterByPredicate(linkedIssues("is Epic of") UNION subtasks(linkedIssues("is Epic of")), ^%{00094} not in %{00094})
    
  12. Dinesh Loyapalli reporter

    I have a Sizing story which takes all the components from the EPIC and creates the sub-tasks for all the components selected.Now when we add a new component to the epic it should also get added to the story and also sub-task has to be created for the component that we have added

  13. Dinesh Loyapalli reporter

    now the components are not being updated at sizing story when we add a new component and do Impact analysis transition. Initially we used to make this transition only once but now this transition is available for multiple statues and now when ever we add a new component if has to reflect the changes to Sizing story and create sub-tasks for the components that are not existing and it should not create the sub-tasks for the components that are already there..

  14. Fidel Castro Armario repo owner

    Hi @DineshLoyapalli,

    Please, attach screenshot of post-function's tab of your "Impact analysis" transition. I want to see all the transitions you are executing and their configurations.

  15. Fidel Castro Armario repo owner

    Hi @DineshLoyapalli,

    Add "Create issues and subtasks" post-function to "Impact analysis" transition in epic's workflow with the following configuration:

    conf-0.png conf-1.png conf-2.png Captura de pantalla 2017-06-08 a las 23.50.31.png

    String list expression for seed strings is:

    filterByPredicate(toStringList(%{00094}), count(filterByPredicate(subtasks(filterByIssueType(linkedIssues("is Epic of"), "Sizing Story")), ^%{00000} ~ ^%)) = 0)
    

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

    Issue list for parent selection is:

    filterByIssueType(linkedIssues("is Epic of"), "Sizing Story")
    

    String expression for Summary is:

    ^% + " Sizing for " + %{00000}
    

    Issue list expression for issue links to component stories is:

    filterByPredicate(filterByIssueType(linkedIssues("is Epic of"), "Component Story"), ^2%{00000} ~ ^%)
    

    Boolean expression for conditional execution is:

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

    @DineshLoyapalli, I hope you appreciate the effort employed for answering such a complex question.

  16. Dinesh Loyapalli reporter

    Thank you so much....you always respond within no time...Let me add the post function and see if its working fine or not....

    Thank you

  17. Dinesh Loyapalli reporter

    Its creating the sizing sub-tasks in the sizing story...but the component field in the Sizing story is not getting updated with the components after making the identify impacts transition again..

  18. Dinesh Loyapalli reporter

    Thanks Fidel.I think when i click on Identify Impacts it should update the components with the newly selected components.I will add this Post function to the Identify Impacts Transition as well as "Edit Components" Transition.

    Thanks

  19. Dinesh Loyapalli reporter

    Fidel,

    Now when we click on "Identify Impacts Transition" and select the same component that we have Cancelled Initially ,it should change the status of the already created Component story status to Open and also the respective Sizing sub-task to Open Status and also the values that we have excluded initially from the overall sizing should be added up again.Can this be achieved?

  20. Fidel Castro Armario repo owner

    Hi @DineshLoyapalli,

    I knew that, but prefer to solve the problems one by one.

    You should add "Write field on issues returned by JQL Query or Issue List" post-function to Identify Impacts Transition and "Edit Components" transitions in epic's workflow with the following configuration:

    Captura de pantalla 2017-06-15 a las 23.20.19.png

    Issue list expression is:

    filterByPredicate(linkedIssues("is Epic of") UNION subtasks(linkedIssues("is Epic of")), ^%{00094} in %{00094} AND ^%{00016} = "Cancelled") 
    

    where %{00094} is field code for Components, and %{00016} is field code for Issue status.

    Beware to write the name of the Cancelled status exactly as it is. Beware that JIRA UI shows the name of the status in uppercase. You can check up the actual name of the status at Administration > Issues > Issue status.

  21. Log in to comment