Uploaded image for project: 'ui-orders'
  1. ui-orders
  2. UIOR-332

Add validation to POL product id field if product id type is isbn

    XMLWordPrintable

Details

    • ACQ Sprint 73
    • 3
    • Thunderjet

    Description

      Purpose:
      To implement UIOR-274 with exact match search by 13-digit isbn we need to add UI validation to the product id field if product id type is selected as ISBN. Also, if ISBNs are brought over from an Inventory Instance, any 10-digit versions need to be translated to 13-digits and deduplicated

      NOTE: Most of this should be achievable with the ISBN normalization work done in MODINV-122

      Per Craig, do the validation in the backend and return appropriate error messages to front end.

      Scenarios

      1. Scenario 1
        • Given a user creating a POL
        • When the user adds a product ID manually with type = ISBN
        • Then validate the ISBN
          • If the ISBN is 10 digits, validate that it calculates properly and then change it to its 13-digit equivalent
          • If the changed 10-digit ISBN duplicates a 13-digit ISBN in the POL, remove the duplicate. Only retain one copy of the ID in the POL if there are duplicates From A-M: I'm seeing both (the original 13, and the translated 10, which ends up the same as the original 13) - is it possible to remove the duplicate? Per Craig, will be handled with MODORDERS-316
          • If the ISBN has any information following the number, separated from the number by a space, ignore that additional info when calculating the ISBN; UIOR-392 moves the ISBN qualifiers to a separate field
          • If the ISBN has hyphens, remove the hyphens and store as only a 13 digit number (plus any qualifier information after it)
      2. Scenario 2
        • Given a user creating a POL
        • When the POL's Product ID field is populated from an Inventory Instance record, and the Product ID type = ISBN
        • Then validate the ISBN, as indicated in scenario 1
        • NOTE Multiple ISBNs may be copied from the Instance. Often there will be 10/13 ISBN pairs on the Instance record. When they are copied, and the 10s changed to 13s, then there will be duplicate ISBNs that should be removed from the POL. See attached screenshots for examples. Per Craig, will be handled with MODORDERS-316
        • NOTE When all this automated manipulation is done to the ISBNs brought over from the Instance, DO NOT break the UUID link from the POL to the related Inventory Instance.
      3. Scenario 3
        • Given a user creating a POL with a Product ID field with Product ID type = ISBN
        • When the user tries to save the POL
        • And all ISBNs in the POL are valid
        • Then allow the POL to be saved
      4. Scenario 4
        • Given a user creating a POL with a Product ID field with Product ID type = ISBN
        • When the user tries to save the POL
        • And any ISBN in the POL is NOT valid
        • Then outline that field in red
        • And show this message in red below the field: Invalid ISBN; adjust or remove
        • And continue to try to validate/show errors every time they press Save, until all ISBNs in the POL are valid or have been removed
      5. Scenario 5
        • Ensure test coverage is 80%+

      NOTE: This story should not be done until UIOR-373 is completed. That story will restrict some of the problem ISBNs from being copied from the Inventory Instance (the ones with Resource ID type = Invalid ISBN)

      TestRail: Results

        Attachments

          1. Instance ISBNs.PNG
            Instance ISBNs.PNG
            107 kB
          2. isbn_validation.png
            isbn_validation.png
            97 kB
          3. item-in-inventory.png
            item-in-inventory.png
            129 kB
          4. POL ISBNs.PNG
            POL ISBNs.PNG
            79 kB
          5. Updated ISBN error message.PNG
            Updated ISBN error message.PNG
            46 kB

          Issue Links

            Activity

              People

                abreaux Ann-Marie Breaux
                abreaux Ann-Marie Breaux
                Ann-Marie Breaux Ann-Marie Breaux
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases