TBX import fails on existing transacGrp with empty person link

XMLWordPrintable

    • High
    • None
    • Fixed TBX re-import failures caused by legacy transaction metadata with missing person links.
    • None

      problem

      A TBX re-import into an existing term collection can fail while loading existing transaction groups. The import aborts with a TypeError when an existing transaction group row has no linked person id, although the person name is available in the transaction note.

      The affected legacy data can originate from an older migration that created transaction group person rows only from term-level transaction groups. Entry-level or language-level responsibility transaction groups could therefore remain without a corresponding person link. A later migration added `terms_transacgrp.tbxPersonId` and backfilled it only for already existing person rows, so these legacy rows could keep `tbxPersonId = NULL`.

      solution

      Add a database migration that repairs legacy transaction group person links once. The migration creates missing `terms_transacgrp_person` rows from all responsibility transaction groups and then fills missing `terms_transacgrp.tbxPersonId` values via `collectionId` and `transacNote`. No import-time repair should run on every TBX import.

      Testing

      When import on client is successful this is testing enough.
       
       
       

       

            Assignee:
            Thomas Lauria
            Reporter:
            Thomas Lauria
            None
            None
            Pavel Perminov, Sanya Mikhliaiev
            NO-FRONTEND-TESTING NEEDED
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None