Uploaded image for project: 'mod-source-record-manager'
  1. mod-source-record-manager
  2. MODSOURMAN-621

Inconsistency of mapping rules in database

    XMLWordPrintable

Details

    • eHoldings Sprint 128, eHoldings Sprint 129, eHoldings Sprint 130
    • 3
    • Spitfire
    • R3 2021 Bug Fix

    Description

      Overview:

      Each time POST /_/tenant called a new portion of default mapping rules is saved to the database. This may cause that not last updated rules will be used for records mapping.
      Steps to Reproduce:

      1. Call POST /_/tenant on an empty database
      2. Call POST /_/tenant one more time

      Expected Results: 1 rule per record type in the database
      Actual Results: 2 rules per record type in the database.
      Open questions:

      1. Should the module replace already existing mapping rules for default when the module is updating to a new version?
      2. We should clear the database from extra rules that have already been saved to the database. But due to database structure, we couldn't detect which rule is last updated. Will it be a big problem if we save default rules to the database instead of already existing?

      Approach:

      1. Clear database from existed rules. (depends on the answer to the 2nd question)
      2. Modify database to have a unique constraint for `record_type` column.
      3. Modify logic of saving rules. Depends on the answer to the 1nd question:
        1. Replace existing rules with default ones.
        2. Don't save default rules if rule for recordType already exist in database

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                psmagin Pavlo Smahin
                psmagin Pavlo Smahin
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases