•  
      story #27185 add a team and inherit the existing PI & Iterations
    Summary
    train engineer
    add a team and inherit the existing PI & Iterations

    I can join a running train

    https://www.figma.com/proto/hhCTI6ayPINCwRGHUokgLV/Untitled?page-id=0%3A1&node-id=7%3A4192&viewport=-267%2C542%2C0.56&scaling=min-zoom&starting-point-node-id=0%3A732

    In program management administration, when a team is displayed, there is a check for consistency with following rule:

    • If all Open Program Increment of the Program exists in the team, display nothing
    • If at least one Open Program Increment of the Program doesn't exist for the Team, the "Sync button" is proposed.
      • There should be no configuration blockers for the Team as well.
    • If one synchronization task is scheduled or on going, display "Sync button" grayed (cannot be clicked)
      • The synchronization is recorded in the DB with a specific table/column
      • This flag is cleared at the end of the synchronization process and purged in daily batch job (in case of failure)

    When the "Sync" button is clicked then:

    • Page is submitted
    • All Open Program Increment that don't have mirrored PI in the Team are created
    • For each created Program Increment, all Iterations are created (even the closed one) for the sake of consistency across the teams.

    Notes:

    • there is no check of Iterations consistency. For instance if, for some reasons, an already mirrored PI (so not concerned by the Sync) is missing Iterations, they won't be recreated at Sync (because they are not part of PI being created).
    • if synchronization crash, the button will be remained grayed until the next daily cron job. It's good enough error management at this stage as the sync is not expected to crash at all (it can be fixed in DB as well in case of issue)
    • backlog is not handled, if user stories are created before synchronisation they won't be added in backlog
    Empty
    Empty
    Status
    Program Management
    Done
    Development
    • [ ] Does it involves User Interface? 
    • [ ] Are there any mockups?
    • [ ] Are permissions checked?
    • [ ] Does it need Javascript development?
    • [ ] Does it need a forge upgrade bucket?
    • [ ] Does it need to execute things in system events?
    • [ ] Does it impact project creation (templates)?
    • [ ] Is it exploratory?
    Empty
    Details
    #27185
    Manuel Vacelet (vaceletm)
    2022-08-02 17:22
    2022-06-17 17:12
    3528

    References
    Referencing story #27185

    Artifact Tracker v5

    rel #26786 13.12

    Git commit

    tuleap/tuleap/stable

    add feature flag, and hide button when no configuration error a532be7441
    Display synchronize button only when team has missing PI 28f54b0727
    Refacto: Move presenter from Domain to Adapter bd5927e677
    button label should reflect the PI label 7bcf7ab631
    Project can no longer be defined as Program b7d4fa92d2
    Refacto: Move ArtifactLinkFieldError presenter from Domain to Adapter d76ee6bec3
    Add a log to indicate we want to synchronize a team 02c8bb5fdf
    REST test error 400 when trying to remove Feature with planned children from PI 8c5a6eb8e7
    transform log of team to synchronize into a redis event 9a5c74034c
    log missing PI to create 24151071d2
    Create missing program increments in team 7c55a46d61
    Extract plan change build in a dedicated builder 581ad6824e
    Create missing iterations 1bb3e1b546
    Disable sync and remove buttons when sync is pending 3ad3881e39
    Add error badge when error has occurred 0f13539973
    Remove feature flag e4cf1f90a1
    Refacto: Move RequiredFieldError presenter from Domain to Adapter eadd1c5b30
    Refacto: Move SemanticError presenter from Domain to Adapter 47d432cb38
    Move SemanticStatusMissingValuesPresenter from Domain to Adapter c00fa8d76d
    Move SemanticStatusNoFieldPresenter from Domain to Adapter 5b943600b2
    Move TeamHasNoPlanningPresenter from Domain to Adapter 151911d559
    Move TitleHasIncorrectType from Adapter to Domain 242d62158d
    Move WorkflowErrorPresenter from Domain to Adapter c86d03ef50
    TrackerPresenter must be built from a Domain object a135f0db72
    ProgramAdminPresenter is now built from a Domain object 548cb58fd9
    Test that team can be synchronized fdd82229d0

    Follow-ups

    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes