Koha/t/db_dependent
Marcel de Rooy ad38b24308 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@rijksmuseum.nl>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-02-14 14:01:11 +00:00
..
Acquisition
api/v1
Auth
Authorities Bug 17913: [Follow-up] Another small fix for UNIMARC 2017-01-20 13:55:13 +00:00
Biblio
Circulation Bug 8361: Do not allow checkouts if no rules are defined 2017-01-20 13:41:59 +00:00
Creators Bug 18044: Add a test 2017-02-07 17:46:00 +00:00
data
Exporter Bug 17196: [QA Follow-up] Wrong module in Record.t 2017-01-13 13:49:29 +00:00
Holds Bug 17196: Move marcxml out of the biblioitems table 2017-01-13 13:49:26 +00:00
Items
Koha Bug 17782: Fix tests 2017-02-07 17:54:58 +00:00
Labels Bug 14468: (QA followup) remove useless diags 2015-10-27 10:38:15 -03:00
LDAP
Letters
Members Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59 2017-02-14 13:59:23 +00:00
OAI
Patron Bug 17486: [QA Follow-up] Changes as to set_userenv 2017-01-13 12:32:20 +00:00
Record Bug 17249: Remove GetKohaAuthorisedValuesFromField - add tests 2016-10-21 15:13:55 +00:00
Reports
Reserves Bug 17766 - Patron notification does not work with multi item holds 2017-01-13 11:29:28 +00:00
Search
selenium
Serials Bug 13726: Make Koha::Acq::Bookseller using Koha::Object 2016-12-30 11:54:32 +00:00
SIP
Template/Plugin
Utils Bug 14874 - Add ability to search for patrons by date of birth from checkout and patron quick searches 2016-10-27 13:21:13 +00:00
www
XSLT_Handler Bug 13262 - Add parameters to XSLT Handler transform method 2015-02-05 15:24:29 -03:00
00-strict.t Bug 7844: (follow-up) don't test koha.psgi for ability to compile (yet) 2014-04-29 19:34:23 +00:00
Accounts.t Bug 17894 - Remove and replace WriteOffFee 2017-01-19 11:15:26 +00:00
Acquisition.t Bug 13726: Make Koha::Acq::Bookseller using Koha::Object 2016-12-30 11:54:32 +00:00
AdditionalField.t
Amazon.t
ArticleRequests.t Bug 14610 - Add unit tests 2016-10-26 12:15:15 +00:00
AudioAlerts.t
Auth.t
Auth_with_cas.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
Auth_with_ldap.t Bug 17615 - Fix unit tests 2017-01-20 13:37:34 +00:00
AuthorisedValues.t
AuthoritiesMarc.t Bug 18014: AddAuthority should respect AUTO_INCREMENT 2017-02-14 14:01:11 +00:00
BackgroundJob.t Bug 17426: Do not set AutoCommit in tests 2016-10-21 14:34:21 +00:00
Barcodes.t
Barcodes_ValueBuilder.t Bug 15081: (QA followup) Fix issue with Barcodes_ValueBuilder.t 2015-11-04 12:32:57 -03:00
Biblio.t Bug 17196: Fix - Update metadata on update 2017-01-13 13:49:27 +00:00
Bookseller.t
Breeding.t
Budgets.t Bug 13726: Make Koha::Acq::Bookseller using Koha::Object 2016-12-30 11:54:32 +00:00
Charset.t
check_sysprefs.t Bug 17917: [AMENDED] Fix path issue in t/db_dependent/check_sysprefs.t 2017-01-20 13:39:37 +00:00
Circulation.t Bug 17678: Typo iss in Circulation.t 2016-12-23 11:46:21 +00:00
ClassSource.t
ColumnsSettings.t Bug 16177: Fix tests for ColumnsSsettings.t 2016-04-01 19:08:23 +00:00
Context.t
Contract.t
CourseReserves.t Bug 17716: (followup) Remove dep on existing data and tidy 2016-12-05 15:32:57 +00:00
db_structure.t
DecreaseLoanHighHolds.t Bug 16387: Fix default shortened loan period time 2017-02-07 17:54:21 +00:00
default_search_class.pl Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
Filter_MARC_ViewPolicy.t Bug 11592: Add should_hide_marc method to filter 2016-09-08 11:54:16 +00:00
Fines.t Bug 13590: Add ability to charge fines at start of charge period 2015-10-22 14:51:24 -03:00
FrameworkPlugin.t Bug 14199: Unify marc orgcode plugins, not overwriting existing values 2016-02-26 14:04:28 +00:00
Heading_MARC21.t Merge remote-tracking branch 'origin/new/bug_7284' 2012-04-04 18:18:26 +02:00
Hold.t Bug 14642: (QA followup) Add tests for Koha::Hold->delete 2016-08-17 18:43:13 +00:00
Holds.t Bug 15758: Koha::Libraries - Ultimate duel for C4::Branch 2016-09-08 14:36:04 +00:00
HoldsQueue.t Bug 17196: Move marcxml out of the biblioitems table 2017-01-13 13:49:26 +00:00
Holidays.t Bug 16376: (regression tests) 2016-12-09 15:25:01 +00:00
ILSDI_Services.t Bug 17836: (ILSDI) Regression test 2017-01-20 13:44:57 +00:00
ImportBatch.t Bug 9259: Use is instead of is_deeply 2016-07-08 13:43:53 +00:00
Installer.t Bug 17234: Need to separate KEY and FOREIGN KEY checks 2017-01-12 12:43:10 +00:00
Items.t Bug 17512: Improve handling dates in C4::Items 2017-02-14 13:57:49 +00:00
Items_DelItemCheck.t Bug 14504: Changes missed while fixing patches 2016-08-26 12:07:27 +00:00
KitchenSinkPlugin.kpz Bug 17368: Update KitchenSinkPlugin.kpz 2016-10-21 14:48:53 +00:00
Koha.t
Koha_Authority.t Bug 15578: Insert authority records before processing tests 2016-01-23 18:28:49 +00:00
Koha_Database.t Bug 13645: Cache the DBIx connection 2015-02-20 14:37:08 -03:00
Koha_Elasticsearch.t Bug 17255 - Upgrade Elastic Search code to work with version 5.1 2017-02-07 17:17:54 +00:00
Koha_Elasticsearch_Indexer.t Bug 17372: Standardize Elasticsearch paths 2016-10-11 01:07:03 +00:00
Koha_Misc_Files.t
Koha_SearchEngine_Elasticsearch_Search.t Bug 17377: Add tests for json2marc 2016-11-18 13:53:20 +00:00
Languages.t Bug 16866: Catch warning t/db_dependent/Languages.t 2016-07-08 14:50:18 +00:00
Letters.t
Linker_FirstMatch.t
Log.t
MarcModificationTemplates.t
Members.t
MungeMarcPrice.t
NewsChannels.t Bug 17960: Rename opac_news.new with opac_news.content 2017-02-06 17:42:12 +00:00
Overdues.t
Passwordrecovery.t Bug 15585: Remove "shift on reference is experimental" warning 2016-03-22 23:08:21 +00:00
PatronLists.t Bug 17486: [QA Follow-up] Changes as to set_userenv 2017-01-13 12:32:20 +00:00
Patrons.t
Plugins.t Bug 15879: Add Tests 2017-01-11 14:03:00 +00:00
QueryParser.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
Record.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
RecordProcessor_EmbedSeeFromHeadings.t
RefundLostItemFeeRule.t
Reports.t Bug 5327: Shifting a db dependent test to the right place 2012-02-01 18:15:19 +01:00
Reserves.t Bug 17588: get_account_lines->get_balance has been replace with account->balance 2017-01-20 14:25:35 +00:00
rollingloans.t Bug 17578: GetMemberDetails - Remove GetMemberDetails 2016-12-16 13:12:44 +00:00
RotatingCollections.t Bug 15629: Koha::Libraries - Remove ModBranch 2016-02-24 03:55:06 +00:00
Search.t Bug 17917: [QA Follow-up] Reprove Search.t 2017-01-20 13:39:36 +00:00
Serials.t Bug 15030: Add tests 2017-02-07 17:43:49 +00:00
Serials_2.t Bug 7677: UT: Remove $dbh->rollback 2016-09-12 09:13:58 +00:00
Service.t
ShelfBrowser.t
Sitemapper.t Bug 17920: t/db_dependent/Sitemapper.t fails because of permissions 2017-01-20 14:04:21 +00:00
Stats.t Bug 11230 - Refactor C4::Stats::UpdateStats and add UT 2014-07-27 11:29:28 -03:00
SuggestionEngine_ExplodedTerms.t Bug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t 2016-07-08 13:08:09 +00:00
Suggestions.t
sysprefs.t Bug 11998: Use Koha::Cache to cache sysprefs 2016-03-15 07:08:28 +00:00
Tags.t Bug 12916 - Missing Test to demonstrate warnings. 2014-10-30 00:31:26 -03:00
Templates.t
TestBuilder.t Bug 17726: [QA Follow-up] Add test descriptions 2017-01-20 13:43:18 +00:00
Upload.t Bug 17501: [Follow-up] QA Requests 2017-01-20 14:20:07 +00:00
UsageStats.t Bug 17196: Move marcxml out of the biblioitems table 2017-01-13 13:49:26 +00:00
Virtualshelves.t
XISBN.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
XSLT_Handler.t
zebra_config.pl Bug 15082: t/db_dependent/Search.t shouldn't mock the DB connection 2015-10-29 14:10:23 -03:00