Bug 10132 - Add option to set MarcOrgCode on branch level
Summary: Add option to set MarcOrgCode on branch level
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Josef Moravec
QA Contact:
URL:
Whiteboard:
Keywords:
: 18751 (view as bug list)
Depends on:
Blocks: 19292
  Show dependency treegraph
 
Reported: 2013-04-26 15:11 UTC by Katrin Fischer
Modified: 2017-11-28 14:38 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
This development allows setting different MARC organization codes (http://www.loc.gov/marc/organizations) for each library/branch, instead of only the globally configured 'MARCOrgCode' syspref. This is particularly useful for consortia with different libraries and different MARC organization codes.


Attachments
Bug 10132 - database changes (1.93 KB, patch)
2017-06-11 20:18 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 10132 - database result class change (1.49 KB, patch)
2017-06-11 20:18 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 10132 - add tests (1.67 KB, patch)
2017-06-11 20:19 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 10132 - admin pages changes (3.12 KB, patch)
2017-06-11 20:19 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 10132 - Ability to set MARC Organization Code at library level (5.58 KB, patch)
2017-06-11 20:19 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 10132: Database changes (2.03 KB, patch)
2017-09-11 19:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: DBIC update (1.56 KB, patch)
2017-09-11 19:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: Unit tests (1.76 KB, patch)
2017-09-11 19:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: Admin pages changes (3.22 KB, patch)
2017-09-11 19:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: Add ability to set MARC Organization Code at library level (5.67 KB, patch)
2017-09-11 19:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: (QA followup) Organize tests in subtest (2.42 KB, patch)
2017-09-11 19:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: (QA followup) Add POD to ->get_effective_marcorgcode (1.80 KB, patch)
2017-09-11 19:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: (QA followup) Open LOC URL on a separate window (2.28 KB, patch)
2017-09-11 19:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10132: Simplify code, call the method only once (1.69 KB, patch)
2017-09-19 13:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10132: Simplify code, call the method only once (1.69 KB, patch)
2017-09-19 13:44 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2013-04-26 15:11:12 UTC
For consortia with different libraries and different MARCOrgCodes it would be useful if you could add the MARCOrgCode in the branch configuration.
Comment 1 Indranil Das Gupta 2014-09-08 17:20:57 UTC
This would be rather useful in a few of the use-cases where I'm encountering individual libraries contributing marc data as part of a government driven library consortium. These libraries are being tried as branches. Branch specific MarcOrgCode could easy a lot of pain.
Comment 2 Tomás Cohen Arazi 2017-06-07 17:59:19 UTC
*** Bug 18751 has been marked as a duplicate of this bug. ***
Comment 3 Josef Moravec 2017-06-11 20:18:54 UTC
Created attachment 64183 [details] [review]
Bug 10132 - database changes
Comment 4 Josef Moravec 2017-06-11 20:18:57 UTC
Created attachment 64184 [details] [review]
Bug 10132 - database result class change
Comment 5 Josef Moravec 2017-06-11 20:19:01 UTC
Created attachment 64185 [details] [review]
Bug 10132 - add tests
Comment 6 Josef Moravec 2017-06-11 20:19:04 UTC
Created attachment 64186 [details] [review]
Bug 10132 - admin pages changes
Comment 7 Josef Moravec 2017-06-11 20:19:08 UTC
Created attachment 64187 [details] [review]
Bug 10132 - Ability to set MARC Organization Code at library level

Test plan:
0. Apply patches
1. Update database
2. Go to administration -> libraries, try to update some library and
fill in some value into Marc Organization code field
3. Save this library and edit again - the code should be stored
correctly
4. Go to system preferences and fill in some value into MARCOrgCode
preference, note there is enhanced description mentioning the ability to
set organization code on library level
5. Set active library to the one with own org code stored
6. Go to cataloguing, create new empty record and click into field 003 -
there should be the code you filled for that library
7. Set active library to one withou marc org code
8. Go to cataloguing, create new empty record and click into field 003 -
there should be the code from system preference
9. Go to system preferences again and set AutoCreateAuthorities to
'generate' and BiblioAddsAuthorities to 'allow'
10. Go to cataloguing and create some biblio record, fill in any author
in to create its authority record, save the biblio
11. Go to authorities and find this created authority, go to details and
check the fields: 003, 040$a, 040$c, 670$a - there should be used right org code
12. prove t/db_dependent/AuthoritiesMarc.t t/db_dependent/Biblio.t t/db_dependent/Koha/Libraries.t
Comment 8 Hugo Agud 2017-07-27 09:22:52 UTC
I have applied the patch, and go through the test plan, including tests, and everything goes as it expected

nice work!
Comment 9 Tomás Cohen Arazi 2017-09-11 19:15:50 UTC
Created attachment 67060 [details] [review]
Bug 10132: Database changes

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2017-09-11 19:15:58 UTC
Created attachment 67061 [details] [review]
Bug 10132: DBIC update

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Tomás Cohen Arazi 2017-09-11 19:16:06 UTC
Created attachment 67062 [details] [review]
Bug 10132: Unit tests

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Tomás Cohen Arazi 2017-09-11 19:16:14 UTC
Created attachment 67063 [details] [review]
Bug 10132: Admin pages changes

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Tomás Cohen Arazi 2017-09-11 19:16:23 UTC
Created attachment 67064 [details] [review]
Bug 10132: Add ability to set MARC Organization Code at library level

Test plan:
0. Apply patches
1. Update database
2. Go to administration -> libraries, try to update some library and
fill in some value into Marc Organization code field
3. Save this library and edit again - the code should be stored
correctly
4. Go to system preferences and fill in some value into MARCOrgCode
preference, note there is enhanced description mentioning the ability to
set organization code on library level
5. Set active library to the one with own org code stored
6. Go to cataloguing, create new empty record and click into field 003 -
there should be the code you filled for that library
7. Set active library to one withou marc org code
8. Go to cataloguing, create new empty record and click into field 003 -
there should be the code from system preference
9. Go to system preferences again and set AutoCreateAuthorities to
'generate' and BiblioAddsAuthorities to 'allow'
10. Go to cataloguing and create some biblio record, fill in any author
in to create its authority record, save the biblio
11. Go to authorities and find this created authority, go to details and
check the fields: 003, 040$a, 040$c, 670$a - there should be used right org code
12. prove t/db_dependent/AuthoritiesMarc.t t/db_dependent/Biblio.t t/db_dependent/Koha/Libraries.t

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 14 Tomás Cohen Arazi 2017-09-11 19:16:30 UTC
Created attachment 67065 [details] [review]
Bug 10132: (QA followup) Organize tests in subtest

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 15 Tomás Cohen Arazi 2017-09-11 19:16:35 UTC
Created attachment 67066 [details] [review]
Bug 10132: (QA followup) Add POD to ->get_effective_marcorgcode

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 16 Tomás Cohen Arazi 2017-09-11 19:16:41 UTC
Created attachment 67067 [details] [review]
Bug 10132: (QA followup) Open LOC URL on a separate window

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 17 Jonathan Druart 2017-09-19 13:00:38 UTC
Created attachment 67208 [details] [review]
Bug 10132: Simplify code, call the method only once
Comment 18 Jonathan Druart 2017-09-19 13:44:37 UTC
Created attachment 67211 [details] [review]
Bug 10132: Simplify code, call the method only once
Comment 19 Jonathan Druart 2017-09-19 14:14:12 UTC
Does it make sense to display the "MARC Organization Code" input field for UNIMARC users?
Comment 20 Jonathan Druart 2017-09-19 14:48:33 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 21 Fridolin SOMERS 2017-10-23 14:50:11 UTC
Enhancement not pushed to 17.05.x