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

If local platform code not set, appears as `null` when a customised URL is proxied

    XMLWordPrintable

    Details

    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      ERM Sprint 102
    • Development Team:
      ERM

      Description

      Overview:
      Steps to Reproduce:

      1. Setup a Proxy string template that uses localPlatformCode variable
      2. Setup a platform URL customiser on one platform which has not got a `local platform code` defined
      3. Wait for templated URLs to generate
      4. Check templated URLs for platform with customiser

      Expected Results:
      The templated URLs should render with an empty string where the localPlatformCode would go

      Actual Results:
      Works as expected for an original URL that has just been proxied
      However for the proxied-customised URL the localPlatformCode is rendered as `null` rather than as an empty string

      Example
      The WAM proxy template is:

      http://{{ insertAfter (insertBefore ( removeProtocol inputUrl ) "/" ".web.library.edu/") "edu/" platformLocalCode }}
      

      De Grutyer Customiser template is:

      http://{{ insertBefore (removeProtocol inputUrl) "/" "/institutionCODE" }}
      

      Output for a PTI

      "templatedUrls": [
              {
                  "id": "98a29e0a-87e0-4b88-9504-1763e29da1da",
                  "url": "http://www.degruyter.com/institutionCODE/openurl?genre=journal&issn=1869-6104",
                  "name": "De Gruyter Customiser",
                  "resource": {
                      "id": "55f6193b-1f5b-4001-8400-da7832b35671"
                  }
              },
              {
                  "id": "89567383-50cd-4121-86f1-baf47501ced7",
                  "url": "http://www.degruyter.com.web.library.edu//openurl?genre=journal&issn=1869-6104",
                  "name": "WAM",
                  "resource": {
                      "id": "55f6193b-1f5b-4001-8400-da7832b35671"
                  }
              },
              {
                  "id": "2de6d643-8a26-411a-b8ca-3787d9a8faab",
                  "url": "https://www.degruyter.com/openurl?genre=journal&issn=1869-6104",
                  "name": "defaultUrl",
                  "resource": {
                      "id": "55f6193b-1f5b-4001-8400-da7832b35671"
                  }
              },
              {
                  "id": "5e14b645-5d96-4c27-a874-e35e5af3c1c6",
                  "url": "http://www.degruyter.com.web.library.edu/null/institutionCODE/openurl?genre=journal&issn=1869-6104",
                  "name": "WAM-De Gruyter Customiser",
                  "resource": {
                      "id": "55f6193b-1f5b-4001-8400-da7832b35671"
                  }
              }
          ]
      

      See that in the plain WAM verision there is just empty string where platform code would go so we get //

      But in WAM-De Grutyer Customiser it comes through as /null/

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases