Issue #667 resolved

How to automatically populate the values of the Custom fields at the Sizing Sub-Task level when ever we select the Component "Test Support Only" in the Epic ?

Dinesh Loyapalli
created an issue

We have 2 post functions at the Sizing Story Create Transition which are used to create the Sizing Sub-Task.

Sizing Post Function.PNG

Sizing Post Functions.PNG

Regardless of whichever component we select there is a Tech-lead Sizing Sub-Task that is created at the Sizing Story level. Now When ever we select the Component "Test Support Only" at the Epic Level this Tech Lead Sub-Task has to populate some default values in the Custom Fields present in it and the status of this Sub-Task should be Done Can this be Achieved ?

Comments (31)

  1. Dinesh Loyapalli reporter

    For ur information, We re-Implemented the Logic for creating the Sizing Stories and Component Stories at the EPIC Level..These post functions are present at Sizing story...

    i would like to re-implement the logic for creating Tech-lead Sizing Sub-Task at the Sizing Story Create Transition using JWT...and then add the functionality that i have specified above...

  2. Fidel Castro Armario repo owner

    Hi Dinesh Loyapalli,

    You can implement the creation of Tech-lead Sizing Sub-Task using "Create issues and subtasks" at Sizing Storie's Create Issue transition with the following configuration:

    Captura de pantalla 2017-06-27 a las 23.59.40.png Captura de pantalla 2017-06-27 a las 23.59.53.pngCaptura de pantalla 2017-06-28 a las 0.00.03.png Captura de pantalla 2017-06-28 a las 0.00.29.png

    String expression for setting field Issue status is:

    "Test Support Only" in fieldValue(%{00094}, linkedIssues("has Epic")) ? "Done" : ""
    

    where %{00094} is field code for Components.

    I have added an example explaining how to set a certain custom field called Short Text with a specific value when Epic contains component "Test Support Only". The expression used is similar to the one for setting Issue Status:

    "Test Support Only" in fieldValue(%{00094}, linkedIssues("has Epic")) ? "Value when 'Test Support Only' is selected in Epic" : ""
    

    In order to move issue to Done status, a transition should exist from initial status to Done status, and their conditions and validators should be satisfied. JWT uses that transition to move the issue automatically to Done status.

  3. Dinesh Loyapalli reporter

    The custom fields that i would like to set are Number Fields...For the value type i don't see any Parsed Text for these Number Fields instead i see Math/Time expression and i have set it to "80" .Will this work?

    And also i don't have any Story link field to set up

  4. Fidel Castro Armario repo owner

    Yes, you should use Math/Time expression, but you should write the value without double quotes, and the alternative value will be null, i.e., something like:

    "Test Support Only" in fieldValue(%{00094}, linkedIssues("has Epic")) ? 80 : null
    
  5. Dinesh Loyapalli reporter

    Sizing Story Create Transition Post Function.PNG

    This is the post function that i have added..Its creating the Tech Lead Sizing Sub-Task but its not changing the status to Done when ever we are selecting Test Support only in the Epic and also not populating the Custom fields with the values that i have specified above.I have added a transition from Open to Done In the Sizing Sub-Task Workflow.

  6. Fidel Castro Armario repo owner

    Hi Dinesh,

    Try the following text expression:

    "Test Support Only" in first(fieldValue(%{00094}, linkedIssues("has Epic"))) ? "Done" : ""
    

    and the following math expression:

    "Test Support Only" in first(fieldValue(%{00094}, linkedIssues("has Epic"))) ? 80 : null
    

    BTW, you can hide your transition from Open to Done to users by adding condition "Transition is triggered by JIRA Workflow Toolbox post-function".

  7. Dinesh Loyapalli reporter

    Fidel,

    "Test Support Only" in first(fieldValue(%{00094}, linkedIssues("has Epic"))) ? "Done" : ""

    this expression sometimes working fine and sometimes its not changing the status.Just now i created a new issue and selected the component "Test Support Only" In Epic and did Impact Analysis,its created the Tech Lead Sizing sub-task but the status has not been changed to "Done"..and also it didn't populate the custom fields with the values that i have set.

    Epic and the sizing story that has been related to Epic.PNGEpic and the sizing story that has been related to Epic.PNG

  8. Dinesh Loyapalli reporter

    Now i have deleted the Sizing story that is related to Epic, again selected Test Support only Component and did impact analysis.Now it has changed the status of the TechLead Sub-Task to "done".But when i am creating the issue for the first and doing the impact analysis its not changing the status.

  9. Dinesh Loyapalli reporter

    Fidel,

    Its still the same..When ever i create the new issue for the first time and select "Test Support Only" and do impact analysis, Sizing story is created and also Tech-Lead Sizing Sub-task is also being created inside the Sizing Story...But the status of the Tech-Lead Sizing Sub-task is in open Status...

    Now i have deleted the Sizing story that is related to Epic, again selected Test Support only Component and did impact analysis.Now it has changed the status of the Tech-lead Sub-Task to "done".But when i am creating the issue for the first and doing the impact analysis its not changing the status.

  10. Dinesh Loyapalli reporter

    I don't have Skype installed in my office system.We can have a screen-share through Zoom.Can you please mention the time-frame.I am available after 6:00 PM CST and 6:00 am to 8:00 am CST any day.Here is the Invitation:-

    Hi there,

    Dinesh Loyapalli is inviting you to a scheduled Zoom meeting.

    Topic: Dinesh Loyapalli's Personal Meeting Room

    Join from PC, Mac, Linux, iOS or Android: https://zoom.us/j/9787531450

    Or iPhone one-tap (US Toll): +14157629988,,9787531450# or +16465687788,,9787531450#

    Or Telephone: Dial: +1 415 762 9988 (US Toll) or +1 646 568 7788 (US Toll) Meeting ID: 978 753 1450 International numbers available: https://zoom.us/zoomconference?m=BYAWFRq8WZr9KdyuosN6ezaru2VjwqWl

  11. Fidel Castro Armario repo owner

    The problem is solved simply by replacing term "Test Support Only" in first(fieldValue(%{00094}, linkedIssues("has Epic"))) with term "Test Support Only" in %{00094} in the post-function for creating Tech Lead sizing sub-task in the Story workflow.

    With this solution the Tech Lead sizing sub-task will be automatically transitioned to Done status when Sizing Story contains component Test Support Only among others, but if you want to transition when Test Support Only is the only component in the Sizing Story, then you should use the following term: "Test Support Only" = %{00094}.

  12. Dinesh Loyapalli reporter

    replaced the term "Test Support Only" in first(fieldValue(%{00094}, linkedIssues("has Epic"))) with term "Test Support Only" in %{00094} Everything is working good.Thank you so much Fidel. Thanks for connecting and helping me out..

  13. Log in to comment