[Bug 35380] New: PUT /biblios/:biblio_id doesn't respect overlay rules
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Bug ID: 35380 Summary: PUT /biblios/:biblio_id doesn't respect overlay rules Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com CC: tomascohen@gmail.com Based on bug 31801#c5, this endpoint should, at least, respect the any default rule as defined in the MARC overlay rules. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |31801 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31801 [Bug 31801] Add PUT endpoint for Biblios -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |Laura.escamilla@bywatersolu | |tions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliothek@th-wildau.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Miranda Nero <mnero@oslri.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mnero@oslri.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- I would like to move this forward and try to write a patch. Do I understand it right, that f.e. I have a record source (f.e. union catalogue) defined in admin -> record sources. Then I should pass the source id as header param and add it to the ModBiblio call like ModBiblio( $record, $biblio->id, $frameworkcode, { overlay_context => { source => RECORD_SOURCE_ID } } ); I remember we had a discussion about it but could not built the pieces together.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Jan, thanks stepping up. The MARC overlay rules' sources are not linked to the 'Record sources' feature (yet). That work still needs to be done. That said, my understanding is that there are a few options here: (a) Add an 'API' source to the existing MARC overlay rules valid sources. (b) Add a way to pick 'Record sources' within the MARC overlay rules feature. (c) Move the 'MARC overlay rules sources' to the 'Record sources' handling. Having them be 'system defined' and untouchable, and then make the 'MARC overlay rules' feature pick all the options from the 'Record sources'. (d) Make the API controller at least pass a context to `ModBiblio` so *at least* a fallback overlay rule (*) would be applied. I think the compromise solution is (d), and the ideal is (c). (a) and (b) would be transition steps towards (c), and I'd avoid them as much as possible. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #3 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 175800 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175800&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. The patch is still missing some tests but I would like to get some feedback if this solution meets the intentional usecase for record sources and the use of them in the updateBiblio API. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #4 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 175801 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175801&action=edit Bug 35380: [DO NOT PUSH] dbic -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #5 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 175802 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175802&action=edit Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #6 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 175803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175803&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. The patch is still missing some tests but I would like to get some feedback if this solution meets the intentional usecase for record sources and the use of them in the updateBiblio API. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=37258 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion Assignee|tomascohen@gmail.com |bibliothek@th-wildau.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #7 from Jan Kissig <bibliothek@th-wildau.de> --- Can someone please test this approach and give feedback if the way the record overlay rules are now interacting with record sources is okay. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Patch doesn't apply --- Comment #8 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Please rebase. I'm willing to spend time on this one to make it to the crossing line. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175800|0 |1 is obsolete| | Attachment #175801|0 |1 is obsolete| | Attachment #175802|0 |1 is obsolete| | Attachment #175803|0 |1 is obsolete| | --- Comment #9 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 186681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186681&action=edit Bug 35380: Change record sources to by systemdefined This changes the structure of record source with an is_system column which controls wheter this value can be deleted. Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #10 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 186682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186682&action=edit Bug 35380: [DO NOT PUSH] dbic -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #11 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 186683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186683&action=edit Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #12 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 186684 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186684&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. The patch is still missing some tests but I would like to get some feedback if this solution meets the intentional usecase for record sources and the use of them in the updateBiblio API. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #13 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 186685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186685&action=edit Bug 35380: Fix atomicupdate default values This sets can_be_edited to 1 for the predefined record sources -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #14 from Jan Kissig <bibliothek@th-wildau.de> --- (In reply to Tomás Cohen Arazi (tcohen) from comment #8)
Please rebase. I'm willing to spend time on this one to make it to the crossing line.
hey Tomas, its rebased to main now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186681|0 |1 is obsolete| | --- Comment #15 from David Nind <david@davidnind.com> --- Created attachment 190731 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190731&action=edit Bug 35380: Change record sources to by systemdefined This changes the structure of record source with an is_system column which controls wheter this value can be deleted. Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186682|0 |1 is obsolete| | --- Comment #16 from David Nind <david@davidnind.com> --- Created attachment 190732 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190732&action=edit Bug 35380: [DO NOT PUSH] dbic Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186683|0 |1 is obsolete| | --- Comment #17 from David Nind <david@davidnind.com> --- Created attachment 190733 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190733&action=edit Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186684|0 |1 is obsolete| | --- Comment #18 from David Nind <david@davidnind.com> --- Created attachment 190734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190734&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. The patch is still missing some tests but I would like to get some feedback if this solution meets the intentional usecase for record sources and the use of them in the updateBiblio API. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186685|0 |1 is obsolete| | --- Comment #19 from David Nind <david@davidnind.com> --- Created attachment 190735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190735&action=edit Bug 35380: Fix atomicupdate default values This sets can_be_edited to 1 for the predefined record sources Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #20 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Wasn't sure of the sequence of applying patches, so I applied all the patches (step h). 2. As a result, I didn't test step g. Everything else worked as per the test plan. 3. I used Bruno as the API tool: - Create a collection (I called it Koha) - Click the + to add a new request - In the Body section, change to XML and paste in the XML from the patch - In the Headers section, add: - Key: Content-Type - Value: application/marcxml+xml - In the Headers section, add the record source ID (this was 7 for me): - Key: x-record-source-id - Value: 7 - In the Auth section, select Basic Auth and add koha as the username and koha as the password - Save - Click the arrow to run -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #21 from Jan Kissig <bibliothek@th-wildau.de> --- Thank you David for signing off and giving your well-considered feedback which I always appreciate. A notice for QA: this is still more a proof of concept trying to meet the requirements from https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380#c2 and it is missing unit tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jan Kissig from comment #21)
Thank you David for signing off and giving your well-considered feedback which I always appreciate. A notice for QA: this is still more a proof of concept trying to meet the requirements from https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380#c2 and it is missing unit tests.
We do need unit tests before starting QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190731|0 |1 is obsolete| | Attachment #190732|0 |1 is obsolete| | Attachment #190733|0 |1 is obsolete| | Attachment #190734|0 |1 is obsolete| | Attachment #190735|0 |1 is obsolete| | --- Comment #23 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195319 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195319&action=edit Bug 35380: Change record sources to by systemdefined This changes the structure of record source with an is_system column which controls whether this value can be deleted. Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #24 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195320 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195320&action=edit Bug 35380: [DO NOT PUSH] dbic -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #25 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195321&action=edit Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #26 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195322 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195322&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #27 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195323 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195323&action=edit Bug 35380: Unit tests updateBiblio API: - tests for locked records (records with a given record_source which is set to can_be_edited = 0) - tests for MARCOverlayRules bound to a record_source or fallback source (*) As record_sources now has an is_system property which prevents it from getting deleted, all tests creating and deleting a record_source were changed so that is_system is set to 0 on creation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #28 from Jan Kissig <bibliothek@th-wildau.de> --- Updated this patch to include unit tests now: t/db_dependent/Koha/Object.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/record_sources.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195319|0 |1 is obsolete| | Attachment #195320|0 |1 is obsolete| | Attachment #195321|0 |1 is obsolete| | Attachment #195322|0 |1 is obsolete| | Attachment #195323|0 |1 is obsolete| | --- Comment #29 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195454 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195454&action=edit Bug 35380: Change record sources to by systemdefined This changes the structure of record source with an is_system column which controls whether this value can be deleted. Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources Current status: Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #30 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195455 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195455&action=edit Bug 35380: [DO NOT PUSH] dbic -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #31 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195456 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195456&action=edit Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #32 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195457&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #33 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195458 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195458&action=edit Bug 35380: Unit tests updateBiblio API: - tests for locked records (records with a given record_source which is set to can_be_edited = 0) - tests for MARCOverlayRules bound to a record_source or fallback source (*) As record_sources now has an is_system property which prevents it from getting deleted, all tests creating and deleting a record_source were changed so that is_system is set to 0 on creation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #34 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 195459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195459&action=edit Bug 35380: (follow-up): Fix errors from qa script Make atomicupdate script executable, add html filters to tt, annotate is_system as boolean (SQL12 coding guidelines) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195454|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195455|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195456|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195457|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195458|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195459|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #35 from David Nind <david@davidnind.com> --- Created attachment 195715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195715&action=edit Bug 35380: Change record sources to by systemdefined This changes the structure of record source with an is_system column which controls whether this value can be deleted. Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #36 from David Nind <david@davidnind.com> --- Created attachment 195716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195716&action=edit Bug 35380: [DO NOT PUSH] dbic Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #37 from David Nind <david@davidnind.com> --- Created attachment 195717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195717&action=edit Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #38 from David Nind <david@davidnind.com> --- Created attachment 195718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195718&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #39 from David Nind <david@davidnind.com> --- Created attachment 195719 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195719&action=edit Bug 35380: Unit tests updateBiblio API: - tests for locked records (records with a given record_source which is set to can_be_edited = 0) - tests for MARCOverlayRules bound to a record_source or fallback source (*) As record_sources now has an is_system property which prevents it from getting deleted, all tests creating and deleting a record_source were changed so that is_system is set to 0 on creation. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #40 from David Nind <david@davidnind.com> --- Created attachment 195720 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195720&action=edit Bug 35380: (follow-up): Fix errors from qa script Make atomicupdate script executable, add html filters to tt, annotate is_system as boolean (SQL12 coding guidelines) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #41 from David Nind <david@davidnind.com> --- Testing notes (using KTD) - see comment #20 Tests should pass: prove t/db_dependent/Koha/Object.t t/db_dependent/api/v1/biblios.t t/db_dependent/api/v1/record_sources.t Note that there is a QA failure: [FAIL] t/db_dependent/api/v1/biblios.t FAIL forbidden_patterns forbidden pattern: Use https:// instead of http:// for URLs (line 1958) forbidden pattern: Use https:// instead of http:// for URLs (line 1959) forbidden pattern: Use https:// instead of http:// for URLs (line 1960) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Medium patch QA Contact| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195715|0 |1 is obsolete| | Attachment #195716|0 |1 is obsolete| | Attachment #195717|0 |1 is obsolete| | Attachment #195718|0 |1 is obsolete| | Attachment #195719|0 |1 is obsolete| | Attachment #195720|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #42 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196083 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196083&action=edit Bug 35380: Change record sources to by systemdefined This changes the structure of record source with an is_system column which controls whether this value can be deleted. Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #43 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196084 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196084&action=edit Bug 35380: [DO NOT PUSH] dbic Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #44 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196085 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196085&action=edit Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #45 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196086 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196086&action=edit Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID> c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | <NAME> | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID> m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: <ID> <?xml version="1.0" encoding="UTF-8"?> <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd" xmlns="http://www.loc.gov/MARC21/slim"> <leader>01075cam a2200313 a 4500</leader> <controlfield tag="001">foo</controlfield> <controlfield tag="005">20200421093825.0</controlfield> <controlfield tag="008">120417s2012 ch a b 001 0 eng </controlfield> <datafield tag="040" ind1=" " ind2=" "> <subfield code="c">482</subfield> </datafield> <datafield tag="100" ind1="1" ind2=" "> <subfield code="a">Christiansen, Tom.</subfield> <subfield code="9">482</subfield> </datafield> <datafield tag="245" ind1="1" ind2="0"> <subfield code="a">New Title</subfield> <subfield code="c">Tom Christiansen, Brian D. Foy & Larry Wall.</subfield> </datafield> <datafield tag="260" ind1=" " ind2=" "> <subfield code="a">City</subfield> </datafield> <datafield tag="300" ind1=" " ind2=" "> <subfield code="a">Pages and more</subfield> </datafield> <datafield tag="942" ind1=" " ind2=" "> <subfield code="c">BKS</subfield> </datafield> </record> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #46 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196087 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196087&action=edit Bug 35380: Unit tests updateBiblio API: - tests for locked records (records with a given record_source which is set to can_be_edited = 0) - tests for MARCOverlayRules bound to a record_source or fallback source (*) As record_sources now has an is_system property which prevents it from getting deleted, all tests creating and deleting a record_source were changed so that is_system is set to 0 on creation. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #47 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196088&action=edit Bug 35380: (follow-up): Fix errors from qa script Make atomicupdate script executable, add html filters to tt, annotate is_system as boolean (SQL12 coding guidelines) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #48 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196089 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196089&action=edit Bug 35380: (QA follow-up) Fix bulkmarkimport typo in marc-overlay-rules.tt The CASE checks for 'bulkmarkimport' but the record source inserted by the atomicupdate is named 'bulkmarcimport'. The mismatch caused the display label and the JS filter option to fall through to the default (untranslated) case. Fixed in both the rule filter display block and the module_filter_options JS object. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #49 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196090&action=edit Bug 35380: (QA follow-up) Fix data migration for pre-existing record sources INSERT IGNORE silently skips rows whose name already exists, leaving their is_system column at 0. Systems that already had 'intranet', 'z3950' etc. as record sources would not have them protected from deletion. Added an explicit UPDATE after the INSERT to ensure all known system record source names have is_system=1 regardless of whether the row was just inserted or already existed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #50 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 196091 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196091&action=edit Bug 35380: (QA follow-up) Minor code quality fixes - Add order_by => ['name'] to record_sources fetch in marc-overlay-rules.pl so filter dropdown options are consistently sorted - Add COMMENT to record_sources.is_system column in kohastructure.sql to match convention of other columns in that table - Remove commented-out Data::Dumper debug lines from biblios.t - Remove redundant explicit object deletes inside subtests that are already wrapped in txn_rollback; the rollback undoes them anyway -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #51 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks for all the hard work! Pushed to main for the next 26.05.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adolfo.rodriguez@xercode.es --- Comment #52 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Updating a Koha instance on main branch with 8.0.31 MySQL Community Server - GPL I get the following error Upgrade to 25.12.00.037 [09:37:05]: Bug 35380 - Add new unique name to record sources, add default record sources, add is_system column to default record sources. ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: BLOB/TEXT column 'name' used in key specification without a key length at /home/adolfo/workspace/koha-master/C4/Installer.pm line 817 Column name is defined as text in my instance so the key should have a length, is the definition of the column right? I couldn't find the table record_sources here https://schema.koha-community.org/main/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #53 from Jan Kissig <bibliothek@th-wildau.de> --- I am also facing problems on main here (with mariadb) as record_sources gets not filled with defaults. Seems like the installer/data/mysql/db_revs/251200037.pl is not recognized. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #54 from Jan Kissig <bibliothek@th-wildau.de> --- (In reply to Jan Kissig from comment #53)
I am also facing problems on main here (with mariadb) as record_sources gets not filled with defaults.
Seems like the installer/data/mysql/db_revs/251200037.pl is not recognized.
when starting ktd with a lower version number (older git checkout) and then updating to 'main' updatedatabase will fill the default values for record sources (f.e. bulkmarcimport) but how could record_sources be filled on new installations? Is there something needed like installer/data/mysql/mandatory/sysprefs.sql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42301 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42301 [Bug 42301] updatedatabase fails on mysql when adding a unique key to a text column (introduced by 35380) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #55 from Jan Kissig <bibliothek@th-wildau.de> --- (In reply to Adolfo Rodríguez Taboada from comment #52)
Updating a Koha instance on main branch with 8.0.31 MySQL Community Server - GPL I get the following error
Upgrade to 25.12.00.037 [09:37:05]: Bug 35380 - Add new unique name to record sources, add default record sources, add is_system column to default record sources. ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: BLOB/TEXT column 'name' used in key specification without a key length at /home/adolfo/workspace/koha-master/C4/Installer.pm line 817
Column name is defined as text in my instance so the key should have a length, is the definition of the column right?
I couldn't find the table record_sources here https://schema.koha-community.org/main/
I opened https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42301 for he mysql specific case -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42318 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42318 [Bug 42318] Table record_sources is not populated with data on install -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #56 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 197391 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197391&action=edit Bug 35380: (follow-up) Fix DBRev 251200037.pl Patch from commit d14cb04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #57 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Good catch Lucas, that brings us back in sync -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42301 Depends on|42301 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42301 [Bug 42301] updatedatabase fails on mysql when adding a unique key to a text column (introduced by 35380) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42318 Depends on|42318 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42318 [Bug 42318] Table record_sources is not populated with data on install -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197391|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #58 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197392&action=edit Bug 35380: (follow-up) Fix DBRev 251200037.pl Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #59 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | Text to go in the| |This patch makes API release notes| |requests to update a biblio | |(PUT /biblios/:biblio_id) | |to respect record overlay | |rules if defined in Record | |overlay rules -> Module = | |source. | | | |The predefined values for | |record sources are: | |- batchmod (Batch record | |modification) | |- intranet (Staff interface | |MARC editor) | |- batchimport (Stage MARC | |import) | |- z3950 (Z39.50 import) | |- bulkmarcimport (Bulk | |import command line script) | |- import_lexile (Lexile.com | |scores from CSV using the | |command line script) | |and can be expanded in | |Administration -> Record | |Sources. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This patch makes API |This fixes API requests release notes|requests to update a biblio |that update a bibliographic |(PUT /biblios/:biblio_id) |record (PUT |to respect record overlay |/biblios/:biblio_id) so |rules if defined in Record |that they apply the record |overlay rules -> Module = |overlay rules if defined in |source. |Administration > catalog > | |Record overlay rules > |The predefined values for |Module = source. |record sources are: | |- batchmod (Batch record |The predefined values for |modification) |record sources are: |- intranet (Staff interface |- batchmod (Batch record |MARC editor) |modification) |- batchimport (Stage MARC |- intranet (Staff interface |import) |MARC editor) |- z3950 (Z39.50 import) |- batchimport (Stage MARC |- bulkmarcimport (Bulk |import) |import command line script) |- z3950 (Z39.50 import) |- import_lexile (Lexile.com |- bulkmarcimport (Bulk |scores from CSV using the |import command line script) |command line script) |- import_lexile (Lexile.com |and can be expanded in |scores from CSV using the |Administration -> Record |command line script) |Sources. |and can be expanded in | |Administration -> Record | |Sources. --- Comment #60 from David Nind <david@davidnind.com> --- Is "additional_work_needed" still required? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #61 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to David Nind from comment #60)
Is "additional_work_needed" still required?
No, sorry about that! Removing the keyword. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|PUT /biblios/:biblio_id |PUT /biblios/:biblio_id |doesn't respect overlay |doesn't apply record |rules |overlay rules Text to go in the|This fixes API requests |This fixes API requests release notes|that update a bibliographic |that update a bibliographic |record (PUT |record (PUT |/biblios/:biblio_id) so |/biblios/:biblio_id) so |that they apply the record |that they apply the record |overlay rules if defined in |overlay rules if defined in |Administration > catalog > |Administration > Catalog > |Record overlay rules > |Record overlay rules > |Module = source. |Module = source. | | |The predefined values for |The predefined values for |record sources are: |record sources are: |- batchmod (Batch record |- batchmod (Batch record |modification) |modification) |- intranet (Staff interface |- intranet (Staff interface |MARC editor) |MARC editor) |- batchimport (Stage MARC |- batchimport (Stage MARC |import) |import) |- z3950 (Z39.50 import) |- z3950 (Z39.50 import) |- bulkmarcimport (Bulk |- bulkmarcimport (Bulk |import command line script) |import command line script) |- import_lexile (Lexile.com |- import_lexile (Lexile.com |scores from CSV using the |scores from CSV using the |command line script) |command line script) |and can be expanded in |and can be expanded in |Administration -> Record |Administration > Catalog > |Sources. |Record sources. --- Comment #62 from David Nind <david@davidnind.com> --- (In reply to Lucas Gass (lukeg) from comment #61)
(In reply to David Nind from comment #60)
Is "additional_work_needed" still required?
No, sorry about that! Removing the keyword.
No worries 8-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 --- Comment #63 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42972 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42972 [Bug 42972] [25.11.x] Cannot add, edit, or delete MARC overlay rules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42975 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42975 [Bug 42975] Patron category filters broken in Record overlay rules -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #64 from Fridolin Somers <fridolin.somers@biblibre.com> --- Looks very complex. Lets not backport to nearly-end-of-life 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35380 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #65 from David Nind <david@davidnind.com> --- Bug fix, and API-related (not covered in the manual). So no changes required to the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org