[Koha-bugs] [Bug 18014] AddAuthority should respect AUTO_INCREMENT
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Feb 3 13:57:26 CET 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18014
Julian Maurice <julian.maurice at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #59871|0 |1
is obsolete| |
--- Comment #20 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 59882
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59882&action=edit
Bug 18014: AddAuthority should respect AUTO_INCREMENT
Instead of using the MAX(authid)+1 logic, AddAuthority should just save
the record and get the new id. The authid column is an autoincrement.
This eliminates problems where a newly assigned authid also refers to a
previously deleted record. (And it will not cause problems when refining
the dontmerge functionality on report 9988.)
Note: ModAuthority also calls AddAuthority to update an existing record; in
that case we should not create a new record even if the record should not
be found any more (which should be exceptional).
This patch also simplifies handling of 001 in the authority record: in all
cases this field is updated now; no need to check its contents.
Test plan:
[1] Run t/db_dependent/AuthoritiesMarc.t
[2] Add a new authority record via the interface
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset at hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list