Project

General

Profile

feature request #8302

Assure uniqueness of E+M reference number

Added by Andreas Müller 7 months ago. Updated 7 months ago.

Status:
New
Priority:
New
Category:
taxeditor
Start date:
05/24/2019
Due date:
% Done:

0%

Severity:
normal
Tags:

Description

The E+M reference number is stored as (alternative) identifier in CDM. Alternative identifiers allow duplicates (e.g. because they might be the empty string or multiple records may refer to the same identifier in general - which is not true for the E+M reference number).

We need a mechanism to assure that the number is unique.

There are multiple solutions:

  • Add a "must be unique" flag to IdentifierType to flag those identifier types which must be unique. If the flag is set, there should be a unique check before the data is saved. The problem here is how to check this as we have to check against the complete database. Usually this is done by a unique index in databases. But as not all identifiers must be unique this technique can't be used (a work around could be to use an index on (type, identifer-value, x) where x is always the same value for all identifiers of a unique identifier type. For non-unique identifier types x is an arbitrary but always unique value, e.g. a random uuid).
  • During creation of the E+M source number the user could be supported in creating a unique number. E.g. by pressing a button a unique number is created by adding 1 to the current max number. This additionally supports the user in creating the number (currently each user has a block of allowed numbers which is not so comfortable). The only problem is how to check that no 2 users create the same max+1 number before the the first number is saved (see ID generator solutions, e.g. hibernate generators, but they creates unused numbers). Also we need to guarantee that the user is using this creator button.
  • other solution

Also needs discussion how severe this issue is. If numbers are only used for fast searching references, the duplication problem will soon be recognized once you search and get 2 results.

This is both a taxeditor and a cdmlib/cdm issue.


Related issues

Related to Edit - feature request #7894: [CHECK] Import sourceNumber as Identifier for references Resolved 11/08/2018
Related to Edit - feature request #7841: identifier search: filtering by identifier types New 10/23/2018
Related to Edit - feature request #5687: search for alternative identifiers Closed 04/07/2016
Related to Edit - feature request #3983: [DISCUSS] Easier reference selection - Euro+Med sourceID Duplicate 01/22/2014
Related to Edit - feature request #7283: Improvements for alternative identifier search Resolved 02/21/2018
Duplicated by Edit - feature request #8298: Check for E+M Reference number being unique Duplicate 05/23/2019

History

#1 Updated by Andreas Müller 7 months ago

#2 Updated by Andreas Müller 7 months ago

#3 Updated by Andreas Müller 7 months ago

#4 Updated by Andreas Müller 7 months ago

#5 Updated by Andreas Müller 7 months ago

#6 Updated by Andreas Müller 7 months ago

#7 Updated by Andreas Müller 7 months ago

ERS:

zur Nummernvergabe: jeder Editor hatte ursprünglich einen ausreichenden Slot von Nummern, die er konsekutiv vergeben hat. Ich selbst notiere mir immer die letzten Nummern, die ich vergeben habe, damit ich weiß, wo ich weitermachen kann. Oder ich suche tatsächlich in der Datenbank danach. Automatisieren- warum nicht? Hauptsache, Dopplungen werden vermieden. Hatten wir manchmal, wenn Editoren aus Versehen identische Nummern vergeben hatten, ohne es zu merken.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)