How to get the values of Custom fields(EGS , US Efforts) from Sizing Sub-task and update it at Component Story?

Issue #600 resolved
Dinesh Loyapalli created an issue

Now i have two post functions that are being added in Update Components Transition of Component Story for fetching the values of EGS and US Efforts from Sizing sub-task that we have linked.Initially these post functions were working fine but now its giving me a null Exception. So once i click on Update components transition of component story, it should get the values of EGS and US Efforts Fields from sizing sub-task that we have linked with the Component Story.

Can this be achieved?

Comments (19)

  1. Fidel Castro Armario repo owner

    Can you, please, attach the error message you are getting?

    Are you executing the transition before the sub-task are actually created?

    Now, that you have an issue link between Component Sub-task and Component Story (after issue #594), we can use that link instead of the complex selection using regexp on summary.

  2. Dinesh Loyapalli reporter

    We dont have sub-taks in Component Story.We have sub-tasks in Sizing story and we are linking Sizing-sub task with Component story.

  3. Dinesh Loyapalli reporter

    Error While Updating the components.PNG

    I am making this transition only after updating the values of these custom fields in Sizing Sub-Task

  4. Fidel Castro Armario repo owner

    Please, attach a screenshot of the whole post-functions tab. I want to see all the post-functions you are executing.

  5. Dinesh Loyapalli reporter

    Please find the attachment. Component story Update Components Transition post functions.PNG

    This transition is a global-reflexive transition and it has 9 post functions.

  6. Fidel Castro Armario repo owner

    The error is caused by 4th post-function. Please, try disabling post-functions 4th and 5th by setting parameters Conditional execution with boolean expression false.

    After that, please execute the transition, and let me know whether fields EGS Effort and US Efforts are being set.

  7. Dinesh Loyapalli reporter

    Now it's not throwing any error.But the values are not getting updated at Component story level.

  8. Fidel Castro Armario repo owner

    Please, check whether EGS Effort and US Efforts fields in Component Sub-task are set or not.

  9. Dinesh Loyapalli reporter

    The value for Egs Effort is being calculated by adding all the fields at sizing sub-task level. Here is an example:- EGS Planning/Partner Engagement: 12 EGS Analysis: 12 EGS Design: 12 EGS Build: 12 EGS IST: 12 EGS UAT: 12 EGS SPL: 12 EGS Deployment/Post Production: 11 EGS Efforts: 95

  10. Dinesh Loyapalli reporter

    we do the same for US Efforts also. Planning/Partner Engagement:15 Analysis: 15 Design: 15 Build: 15 IST: 15 UAT: 15 SPL: 15 Deployment/Post Production: 15 US Efforts: 120

  11. Dinesh Loyapalli reporter

    Now these values should be updated at Component story level when we click on Update Component Transition.

    I am making this transition only when the values for EGS and US Efforts are being calculated at the sizing sub-task

  12. Fidel Castro Armario repo owner

    Hi Dinesh, try replacing the boolean subexpression matches(^%{Summary}, ".*\\Q" + %{Components} + "\\E.*") with true, and let me know whether it sets fields in Components Story.

    It doesn't matter that the value is not the correct one. I only want to know whether the problem is that the subexpression is always returning false.

  13. Dinesh Loyapalli reporter

    Yup.Now its setting the values at component level...If i replace the "matches(^%{Summary}, ".\Q" + %{Components} + "\E.")" with true

  14. Dinesh Loyapalli reporter

    For the first component it displayed right values but for the second component its showing incorrect values(Showing same values as First component).

  15. Fidel Castro Armario repo owner

    Try using the following string expression in both post-functions:

    first(fieldValue(%{nnnnn}, filterByIssueType(linkedIssues("relates to"), "Sizing Sub-Task")))
    

    replacing nnnnn with field code for EGS Effort or US Efforts.

    Note that I'm assuming that:

    • "relates to" is the issue link type your are using for linking Component Story to Sizing Sub-task.
    • "Sizing Sub-Task" is the exact issue type name.
  16. Log in to comment