Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#1063 closed defect (fixed)

Specimen tube registration tries to register a new item with the same name as an existing item

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: Reggie v4.19.1
Component: net.sf.basedb.reggie Keywords:
Cc:

Description

In this case there is already an existing specimen item registred. A new referral form with a suffix 'D' can't be registred. The final step in the wizard complains about:

Specimen 'xxx.1' has already been registered.

The new specimen should be named 'xxx.2'.

Change History (3)

comment:1 Changed 2 years ago by Nicklas Nordborg

Milestone: Reggie v4.xReggie v4.19.1
Status: newassigned

comment:2 Changed 2 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [4956]) Fixes #1063: Specimen tube registration tries to register a new item with the same name as an existing item

Turned out that the problem was related to the 'C' or 'D' suffix. This was not removed before checking for existing specimen items for the same case which caused the new name to be generated as xxxD.1. This name is unique, but the suffix 'D' is removed later causing the new name to be the same as the already existing item.

The fix is to get rid of the suffix before checking for existing specimen items.

comment:3 Changed 2 years ago by Nicklas Nordborg

(In [4957]) References #1063: Specimen tube registration tries to register a new item with the same name as an existing item

The final commit() should of course not be left out.

Note: See TracTickets for help on using tickets.