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

Add Embargo to PCI in Agreement exports



    • Template:
    • Sprint:
      ERM Sprint 86, ERM Sprint 87, ERM Sprint 88
    • Development Team:


      Following implementation of Embargo data in the Agreements local KB, we should include this information in exports. There are three exports to which this is relevant:

      1. Agreement export from Agreement->view pane->Actions dropdown->Export
      2. Resources in this agreement JSON export from Agreement->view pane->Agreement lines->E-resources covered by this agreement->Export as JSON
      3. Resources in this agreement KBART export from Agreement->view pane->Agreement lines->E-resources covered by this agreement->Export as KBART

      For 1 and 2 the export should serialise the Embargo statement into package content item. The structure for this is as follows:

      "embargo": {
              "movingWallStart": {
                "length": 4,
                "unit": "years"
              "movingWallEnd": {
                "length": 1,
                "unit": "days"

      For 3 the embargo statement should be combined into a single string to be put in the embargo_info field in the KBART export. The single string should be created as follows:

      • Create a string for movingWallStart by concatenating:
        • "R" + embargo.movingWallStart.length + embargo.movingWallStart.unit converting years->Y, months->M, days->D
      • Create a string for movingWallEnd by concatenating:
        • "P" + embargo.movingWallEnd.length + embargo.movingWallEnd.unit converting years->Y, months->M, days->D
      • Single embargo statement created by joining the movingWallStart string with the movingWallEnd string using a semicolon to join the two statements if both exist (if only one statement exists, no semicolon should be used.

      The above example embargo would result in the following KBART embargo statement:

      Attached are files that are:
      IMPORT FILE that can be used to create a package in Folio: embargo_examples_kbart_import.tsv
      AGREEMENT EXPORT from agreement with package attached: embargo_test_agreement_json_export.json
      RESOURCE JSON EXPORT from agreement with package attached: embargo_test_resources_json_export.json
      RESOURCE KBART EXPORT from agreement with package attached: embargo_test_resources_kbart_export.tsv

        TestRail: Results


          1. embargo_examples_kbart_import.tsv
            5 kB
            Owen Stephens
          2. embargo_test_agreement_json_export.json
            21 kB
            Owen Stephens
          3. embargo_test_resources_json_export.json
            18 kB
            Owen Stephens
          4. embargo_test_resources_kbart_export.tsv
            2 kB
            Owen Stephens

            Issue Links



                sosguthorpe Steve Osguthorpe
                ostephens Owen Stephens
                UX Lead:
                Gill Osguthorpe Gill Osguthorpe
                0 Vote for this issue
                2 Start watching this issue



                    TestRail: Runs

                      TestRail: Cases