Bug 19790 - Remove additionalauthors.author from installer files
Summary: Remove additionalauthors.author from installer files
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-11 09:02 UTC by Marcel de Rooy
Modified: 2018-06-04 20:15 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19790: Remove additionalauthors.author from installer files (90.82 KB, patch)
2017-12-11 09:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19790: Add a db revision for existing installs (1.30 KB, patch)
2017-12-11 09:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19790: Remove additionalauthors.author from installer files (90.82 KB, patch)
2017-12-11 09:36 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19790: Add a db revision for existing installs (1.30 KB, patch)
2017-12-11 09:36 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19790: Remove additionalauthors.author from installer files (90.84 KB, patch)
2018-02-09 21:32 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 19790: Add a db revision for existing installs (1.32 KB, patch)
2018-02-09 21:32 UTC, Charles Farmer
Details | Diff | Splinter Review
Bug 19790: Remove additionalauthors.author from installer files (90.89 KB, patch)
2018-02-11 15:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19790: Add a db revision for existing installs (1.37 KB, patch)
2018-02-11 15:43 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2017-12-11 09:02:15 UTC

    
Comment 1 Marcel de Rooy 2017-12-11 09:31:25 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2017-12-11 09:31:30 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2017-12-11 09:36:51 UTC
Created attachment 69679 [details] [review]
Bug 19790: Remove additionalauthors.author from installer files

In the upgrade from 2.2 to 3.0 (some time ago already) the table
additionalauthors has been dropped. Unfortunately, a reference to this
table has not been removed from the MARC framework installer files.

This patch clears kohafield for 700$a or 200$g in 32 installer files.

Note: The reference to additionalauthors in field kohafield is silently
ignored in AddBiblio/ModBiblio since the routines _koha_add_biblio,
_koha_add_biblioitem, _koha_modify_biblio and
_koha_modify_biblioitem_nonmarc simply do not use it. You can define a
Koha to MARC mapping for a biblio/biblioitem field but if the field is not
referenced in one of those routines, nothing happens..
Also note that C4::Items::_koha_modify_item does not hardcode all fields
and will respond to a new item mapping.

Test plan:
[1] Run a new install or verify somehow that the change to these sql files
    is correct.
    The change is a result of: sed -i -e "s/'additionalauthors.author'/''/g"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run a new install with MARC21 and English. This includes the mandatory
file marc21_framework_DEFAULT.sql. Verified that 700$a was inserted
correctly (without additionalauthors).
Comment 4 Marcel de Rooy 2017-12-11 09:36:54 UTC
Created attachment 69680 [details] [review]
Bug 19790: Add a db revision for existing installs

Since many installs may still have the additionalauthors kohafield,
this patch adds a dbrev in atomicupdate to clear it.

Test plan:
[1] Run updatedatabase. Check that you see no additionalauthors anymore
    in marc_subfield_structure.kohafield.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Charles Farmer 2018-02-09 21:30:04 UTC
Installed first without the patch, then with the patch. The second time around, no "additionalauthors" appeared in my database dump.

However, minor nitpick: setting a value to NULL in your atomicupdate script is not the same as setting it to the empty string ''. Perhaps you'd want change your updatedb script in order to have the  same end result, whether you're installing fresh or running updatedatabase over existing data.
Comment 6 Charles Farmer 2018-02-09 21:32:52 UTC
Created attachment 71402 [details] [review]
Bug 19790: Remove additionalauthors.author from installer files

In the upgrade from 2.2 to 3.0 (some time ago already) the table
additionalauthors has been dropped. Unfortunately, a reference to this
table has not been removed from the MARC framework installer files.

This patch clears kohafield for 700$a or 200$g in 32 installer files.

Note: The reference to additionalauthors in field kohafield is silently
ignored in AddBiblio/ModBiblio since the routines _koha_add_biblio,
_koha_add_biblioitem, _koha_modify_biblio and
_koha_modify_biblioitem_nonmarc simply do not use it. You can define a
Koha to MARC mapping for a biblio/biblioitem field but if the field is not
referenced in one of those routines, nothing happens..
Also note that C4::Items::_koha_modify_item does not hardcode all fields
and will respond to a new item mapping.

Test plan:
[1] Run a new install or verify somehow that the change to these sql files
    is correct.
    The change is a result of: sed -i -e "s/'additionalauthors.author'/''/g"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run a new install with MARC21 and English. This includes the mandatory
file marc21_framework_DEFAULT.sql. Verified that 700$a was inserted
correctly (without additionalauthors).

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Comment 7 Charles Farmer 2018-02-09 21:32:56 UTC
Created attachment 71403 [details] [review]
Bug 19790: Add a db revision for existing installs

Since many installs may still have the additionalauthors kohafield,
this patch adds a dbrev in atomicupdate to clear it.

Test plan:
[1] Run updatedatabase. Check that you see no additionalauthors anymore
    in marc_subfield_structure.kohafield.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Comment 8 Katrin Fischer 2018-02-11 15:43:25 UTC
Created attachment 71406 [details] [review]
Bug 19790: Remove additionalauthors.author from installer files

In the upgrade from 2.2 to 3.0 (some time ago already) the table
additionalauthors has been dropped. Unfortunately, a reference to this
table has not been removed from the MARC framework installer files.

This patch clears kohafield for 700$a or 200$g in 32 installer files.

Note: The reference to additionalauthors in field kohafield is silently
ignored in AddBiblio/ModBiblio since the routines _koha_add_biblio,
_koha_add_biblioitem, _koha_modify_biblio and
_koha_modify_biblioitem_nonmarc simply do not use it. You can define a
Koha to MARC mapping for a biblio/biblioitem field but if the field is not
referenced in one of those routines, nothing happens..
Also note that C4::Items::_koha_modify_item does not hardcode all fields
and will respond to a new item mapping.

Test plan:
[1] Run a new install or verify somehow that the change to these sql files
    is correct.
    The change is a result of: sed -i -e "s/'additionalauthors.author'/''/g"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run a new install with MARC21 and English. This includes the mandatory
file marc21_framework_DEFAULT.sql. Verified that 700$a was inserted
correctly (without additionalauthors).

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2018-02-11 15:43:43 UTC
Created attachment 71407 [details] [review]
Bug 19790: Add a db revision for existing installs

Since many installs may still have the additionalauthors kohafield,
this patch adds a dbrev in atomicupdate to clear it.

Test plan:
[1] Run updatedatabase. Check that you see no additionalauthors anymore
    in marc_subfield_structure.kohafield.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2018-02-11 15:44:37 UTC
DB update - not trivial :)
https://wiki.koha-community.org/wiki/Submitting_A_Patch
Comment 11 Jonathan Druart 2018-02-12 21:08:53 UTC
Pushed to master for 18.05, thanks to everybody involved!