Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-1694

Add list of linked agreements to Amendments view

    XMLWordPrintable

    Details

    • Template:
      Front-end User Story Template
    • Sprint:
      ERM Sprint 118
    • Development Team:
      ERM
    • Release:
      R3 2021

      Description

      Purpose:

      When viewing an amendment, and especially after creating an Amendment, it is useful to flag to the user if there are linked agreements already on the license in order that the user can set the status of the new amendment on any agreements already linked to the license

      In the Amendments view pane, display a list of the agreements linked to the owning license and the status of both the linked license and the amendment in relation to the agreement

      User story statement(s):

      As an ERM librarian
      I want to be able to easily see where an amendment does not have a status in relation to an agreement to which the main license is already linked
      so that I can navigate to the agreement and set the status amendment status

      Scenarios:

      1. Scenario:
        • Given a license with an amendment, where the license is linked to an agreement
        • When I view the amendment
        • Then I should see a list of the agreements linked to the license with both the license<>agreement link status and amendment<>agreement link status
      2. Scenario:
        • Given a license with an amendment, where the license is linked to an agreement but the amendment has not been allocated a status within the agreement
          • Add license
          • Add agreement and link license
          • Add amendment to license
          • In this case the response from /linkedAgreements/ will not include the unassigned amendment
        • When I view the amendment
        • Then I should see a list of the agreements linked to the license with the license<>agreement link status and amendment<>agreement link status listed as "Unassigned"

      Dev Task Breakdown:

      1. Declare a manifest entry similar to linkedAgreements within the ViewAmendmentRoute file to fetch the list of linkedAgreements.
      2. Pass the fetched resource down similar to https://github.com/folio-org/ui-licenses/blob/master/src/routes/ViewLicenseRoute.js#L162 under the data prop here.
        You would have to attach the resource to the amendment object similar to how we do it here for the license 
      3. Within the Amendment.js file add a new accordion `Agreements linked to this Amendment` similar to the `Agreements linked to this license` accordion logic here 
      4. Reuse the LicenseAgreements component for displaying the MCL.
        1. The component needs tweaks, i.e. displaying an additional column based on if we displaying it on the amendment view or the license view. You can use the prop name to differentiate this.
        2. Also, the component name needs to be changed as its not just `LicenseAgreements` anymore.
        3. The data to be passed to the MCL should be a part of the `linkedAgreements` resource thats passed in
      5. The getDerivedStateFromProps logic in linkedAgreements has very specific logic which needs to be double checked to include/validate the amendment linked agreements passed down.
      6. For scenario 2 check the amendments array in the linkedAgreements has the `id` of the current amendment being viewed and if not return an `Unassigned` translatable string.

       

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ostephens Owen Stephens
                Reporter:
                ostephens Owen Stephens
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases