Bug 22155 - biblio_metadata.marcflavour should be renamed 'schema'
Summary: biblio_metadata.marcflavour should be renamed 'schema'
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 22159
Blocks: 22144
  Show dependency treegraph
 
Reported: 2019-01-17 16:27 UTC by Tomás Cohen Arazi
Modified: 2019-02-01 15:33 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22155: DB update (3.19 KB, patch)
2019-01-18 01:55 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22155: DB update (3.19 KB, patch)
2019-01-18 02:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema (8.44 KB, patch)
2019-01-18 02:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22155: DB update (3.13 KB, patch)
2019-01-18 10:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema (8.44 KB, patch)
2019-01-18 10:40 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22155: DB update (3.20 KB, patch)
2019-01-18 15:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema (8.51 KB, patch)
2019-01-18 15:26 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22155: DB update (3.25 KB, patch)
2019-01-20 12:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema (8.55 KB, patch)
2019-01-20 12:26 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 Tomás Cohen Arazi 2019-01-17 16:27:59 UTC
If we are thinking of supporting other metadata schemas, the 'marcflavour' field should be renamed 'schema'. This is what the Koha::MetadataRecord class does already.
Comment 1 David Cook 2019-01-18 01:51:46 UTC
I totally agree.
Comment 2 Tomás Cohen Arazi 2019-01-18 01:55:30 UTC
Created attachment 84175 [details] [review]
Bug 22155: DB update
Comment 3 Tomás Cohen Arazi 2019-01-18 02:34:10 UTC
Created attachment 84176 [details] [review]
Bug 22155: DB update
Comment 4 Tomás Cohen Arazi 2019-01-18 02:34:22 UTC
Created attachment 84177 [details] [review]
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema

This patch makes the code using Koha::Biblio::Metadata->marcflavour use
->schema instead for all interactions.

To test:
- Update the DB structure:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Notice all the places in which biblio_metadata is used
  $ cd kohaclone
  $ git grep biblio_metadata
=> SUCCESS: They all use `schema` instead of marcflavour
- Notice all the places that use Koha::Biblio::Metadata:
  $ git grep Koha::Biblio::Metadata
=> SUCCESS: They all use the schema attribute when they used to use
marcflavour
- Run all the modified tests and scripts
=> SUCCESS: We are all good
- Sign off :-D

Note: while this seems like a minor change, the places in which plain
SQL is used really require understanding the queries and how they are
used, because some query results might be passed to some other method
that in turn uses the marcflavour attribute. I of course took that into
account but errare humanum est :-D
Comment 5 Tomás Cohen Arazi 2019-01-18 10:40:14 UTC
Created attachment 84182 [details] [review]
Bug 22155: DB update
Comment 6 Tomás Cohen Arazi 2019-01-18 10:40:22 UTC
Created attachment 84183 [details] [review]
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema

This patch makes the code using Koha::Biblio::Metadata->marcflavour use
->schema instead for all interactions.

To test:
- Update the DB structure:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Notice all the places in which biblio_metadata is used
  $ cd kohaclone
  $ git grep biblio_metadata
=> SUCCESS: They all use `schema` instead of marcflavour
- Notice all the places that use Koha::Biblio::Metadata:
  $ git grep Koha::Biblio::Metadata
=> SUCCESS: They all use the schema attribute when they used to use
marcflavour
- Run all the modified tests and scripts
=> SUCCESS: We are all good
- Sign off :-D

Note: while this seems like a minor change, the places in which plain
SQL is used really require understanding the queries and how they are
used, because some query results might be passed to some other method
that in turn uses the marcflavour attribute. I of course took that into
account but errare humanum est :-D
Comment 7 Kyle M Hall 2019-01-18 15:20:31 UTC
Created attachment 84200 [details] [review]
Bug 22155: DB update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall 2019-01-18 15:26:03 UTC
Created attachment 84201 [details] [review]
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema

This patch makes the code using Koha::Biblio::Metadata->marcflavour use
->schema instead for all interactions.

To test:
- Update the DB structure:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Notice all the places in which biblio_metadata is used
  $ cd kohaclone
  $ git grep biblio_metadata
=> SUCCESS: They all use `schema` instead of marcflavour
- Notice all the places that use Koha::Biblio::Metadata:
  $ git grep Koha::Biblio::Metadata
=> SUCCESS: They all use the schema attribute when they used to use
marcflavour
- Run all the modified tests and scripts
=> SUCCESS: We are all good
- Sign off :-D

Note: while this seems like a minor change, the places in which plain
SQL is used really require understanding the queries and how they are
used, because some query results might be passed to some other method
that in turn uses the marcflavour attribute. I of course took that into
account but errare humanum est :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Katrin Fischer 2019-01-20 12:26:20 UTC
Created attachment 84244 [details] [review]
Bug 22155: DB update

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2019-01-20 12:26:24 UTC
Created attachment 84245 [details] [review]
Bug 22155: Adapt uses of biblio_metadata.marcflavour to schema

This patch makes the code using Koha::Biblio::Metadata->marcflavour use
->schema instead for all interactions.

To test:
- Update the DB structure:
  $ updatedatabase
- Update the schema files:
  $ dbic
- Notice all the places in which biblio_metadata is used
  $ cd kohaclone
  $ git grep biblio_metadata
=> SUCCESS: They all use `schema` instead of marcflavour
- Notice all the places that use Koha::Biblio::Metadata:
  $ git grep Koha::Biblio::Metadata
=> SUCCESS: They all use the schema attribute when they used to use
marcflavour
- Run all the modified tests and scripts
=> SUCCESS: We are all good
- Sign off :-D

Note: while this seems like a minor change, the places in which plain
SQL is used really require understanding the queries and how they are
used, because some query results might be passed to some other method
that in turn uses the marcflavour attribute. I of course took that into
account but errare humanum est :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Nick Clemens 2019-01-31 13:38:56 UTC
Awesome work all!

Pushed to master for 19.05
Comment 12 David Cook 2019-02-01 00:39:59 UTC
(In reply to Nick Clemens from comment #11)
> Awesome work all!
> 
> Pushed to master for 19.05

Nick is a champion :3.
Comment 13 Martin Renvoize 2019-02-01 15:33:36 UTC
Enhancement, will not be backported at this time to  18.11.x series.