Backend: Validation for elements in location hierarchy (institution)

Description

Purpose: Prevent users from creating names and codes in the location hierarchy that will not be processed correctly by circulation rules. (For example, prevent creation of "Science Reserves" when "Science-Reserves" already exists, since "Science Reserves" and "Science-Reserves" will both be normalized to science-reserves in circulation rules.

  1. Scenario

    • Given an Institution A with code <code>

    • When a user attempts to save Institution B, with a code that does not differ from that of Institution A, or differs only by non-alphanumeric characters

    • Then do not allow the user to save

      • Error message: An institution with this code already exists

  2. Scenario

    • Given an institution with a code only consisting of non-alphanumeric characters

    • When a user attempts to save the institution

    • Then do not allow the user to save

      • Institution names must have at least one alphanumeric character

Notes

  • Non-alphanumeric characters should still be allowed (e.g., they may be part of a library's official name)

  • Prevent creation of "Science-Reserves" when "Science Reserves" already exists

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Julian Ladisch September 23, 2020 at 11:29 AM

Moving to mod-inventory-storage where the location hierarchy APIs are: https://s3.amazonaws.com/foliodocs/api/mod-inventory-storage/locationunit.html

Details

Assignee

Reporter

Priority

Story Points

Development Team

Prokopovych

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created March 31, 2020 at 4:06 PM
Updated September 23, 2020 at 11:29 AM
TestRail: Cases
TestRail: Runs