Koha/installer/data/mysql
Alex Buckley ac1a8adba2 Bug 25460: Update OAI sets when adding/editing/deleting item records
Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records.

Test plan:
1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs
2. Create a biblio record with 1 item with CCODE of NFIC
3. In Administration > OAI Sets configuration create a set and define
the mapping:
Field: 952, Subfield: 8, Operator: is equal to,  Value: FIC

4. Run the build_oai_sets.pl script:
 cd misc/migration_tools
 sudo koha-shell <instancename>
 ./build_oai_sets.pl -i

5. Check what items are in the OAI set:
sudo koha-mysql <instancename>
select * from oai_sets_biblios;

6. Observe your bib from step 2 is not in the set
7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set
8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio
still not in OAI set
9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still
not in OAI set

10. Apply patch, update database and restart plack (instruction below on
the latter 2 actions):

cd installer/data/mysql
sudo koha-shell <instancename>
./updatedatabase.pl
sudo koha-plack --restart <instancename>

11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData
12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set
13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and
observe bib now not in set
14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5
and observe bib now in set
15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib
no longer in set

Sponsored-By: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
..
atomicupdate Bug 25460: Update OAI sets when adding/editing/deleting item records 2020-10-15 12:56:30 +02:00
de-DE Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-09 15:39:51 +02:00
en Bug 26018: Fix frameworks errors with subfields in wrong tab 2020-10-14 11:47:57 +02:00
fr-CA Bug 21066: Rename publicationdate with published_on 2020-09-02 15:35:08 +02:00
fr-FR Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-09 15:39:51 +02:00
it-IT Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-09 15:39:51 +02:00
localization Bug 20168: Remove li tags from OPACSearchForTitleIn for new installs 2020-09-09 14:33:45 +02:00
mandatory Bug 25460: Update OAI sets when adding/editing/deleting item records 2020-10-15 12:56:30 +02:00
nb-NO Bug 26007: (QA follow-up) Replace wrong link values from sql installer files 2020-09-09 15:39:51 +02:00
pl-PL Bug 26268: Correct mapping for internal note to items.itemnotes_nonpublic 2020-10-01 10:32:15 +02:00
ru-RU Bug 26268: Correct mapping for internal note to items.itemnotes_nonpublic 2020-10-01 10:32:15 +02:00
uk-UA Bug 26268: Correct mapping for internal note to items.itemnotes_nonpublic 2020-10-01 10:32:15 +02:00
.updatedatabase.pl.swp Bug 25460: Update OAI sets when adding/editing/deleting item records 2020-10-15 12:56:30 +02:00
backfill_statistics.pl Bug 13795: Remove occurences of unused columns in code 2019-04-18 10:05:51 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
kohastructure.sql Bug 26145: Refactoring - Move C4::Images to Koha::CoverImages 2020-10-12 11:28:41 +02:00
labels_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
patroncards_upgrade.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
update22to30.pl Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
updatedatabase.pl Bug 12556: DBRev 20.06.00.051 2020-10-14 14:50:07 +02:00