Currently, it is not possible to select a custom framework as the default, in situations where editing a record with no framework mapped, or importing a staged MARC file with no mapping.
Created attachment 90550 [details] [review] Bug 23111: Set custom bibliographic framework as default This patch adds a new system preference (DefaultBibliographicFramework). Using this a librarian can select the bibliographic framework code to set the the bibliographic framework that will be displayed as default when: * Importing batch of biblio records * Editing a biblio record with no mapped biblio framework Test plan: 1. Apply patch 2. Run ./updatedatabase.pl (in installer/data/mysql) from the Koha shell to implement db changes 3. Search for the syspref DefaultBibliographicFramework in Administration module 4. Notice the syspref has the value 'Default' 5. Locate and edit the record of a bibliographic record not mapped to a framework and notice 'Default' is ticked when you click on 'Settings' 6. Click 'Save' and confirm the frameworkcode of the bibliorecord is Default (stored in the database as empty). You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 7. Import a batch of biblio records and notice that 'Default' is displayed as the framework to be used 8. Confirm the frameworkcode of one of the imported biblio records is default. Do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of biblio imported in step 7>; 9. Select a different frameworkcode (such as Acquisitions) in the DefaultBibliographicFramework syspref 10. Repeat step 5 but notice the DefaultBibliographicFramework framework as shown as the framework 11. Confirm the biblio has the new frameworkcode. You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 12. Repeat step 7 and notice the DefaultBibliographicFramework is shown as the framework to be used 13. Confirm the biblios imported in step 12 have the correct frameworkcode by running the following SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of imported biblio in step 12>; Authored-by: Alex Buckley Sponsored-by: Brimbank Library, Australia
This looks to be working great--and it's a great improvement. The QA tool is giving one warning though: FAIL Koha/BiblioFramework.pm OK critic OK forbidden patterns OK git manipulation FAIL pod *** ERROR: Apparent command =cut not preceded by blank line in file Koha/BiblioFramework.pm Also: Could we get the framework name to show in the system preference instead of just the code? I don't think it's a dealbreaker but it would be more user-friendly.
Created attachment 90587 [details] [review] Bug 23111: (follow-up) Fix for QA test tool failure
Created attachment 90588 [details] [review] Bug 23111: (follow-up) Fix for QA test tool failure Test plan: 1. Follow the test plan in the first commit 2. Run the qa test tool and notice that it no longer fails on the Koha/BiblioFramework.pm Sponsored-By: Brimbank Library, Australia
Created attachment 91039 [details] [review] Bug 23111: Set custom bibliographic framework as default This patch adds a new system preference (DefaultBibliographicFramework). Using this a librarian can select the bibliographic framework code to set the the bibliographic framework that will be displayed as default when: * Importing batch of biblio records * Editing a biblio record with no mapped biblio framework Test plan: 1. Apply patch 2. Run ./updatedatabase.pl (in installer/data/mysql) from the Koha shell to implement db changes 3. Search for the syspref DefaultBibliographicFramework in Administration module 4. Notice the syspref has the value 'Default' 5. Locate and edit the record of a bibliographic record not mapped to a framework and notice 'Default' is ticked when you click on 'Settings' 6. Click 'Save' and confirm the frameworkcode of the bibliorecord is Default (stored in the database as empty). You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 7. Import a batch of biblio records and notice that 'Default' is displayed as the framework to be used 8. Confirm the frameworkcode of one of the imported biblio records is default. Do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of biblio imported in step 7>; 9. Select a different framework (such as Acquisitions) in the DefaultBibliographicFramework syspref 10. Repeat step 5 but notice the DefaultBibliographicFramework framework as shown as the framework 11. Confirm the biblio has the new frameworkcode. You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 12. Repeat step 7 and notice the DefaultBibliographicFramework is shown as the framework to be used 13. Confirm the biblios imported in step 12 have the correct frameworkcode by running the following SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of imported biblio in step 12>; Authored-by: Alex Buckley Sponsored-by: Brimbank Library, Australia
Created attachment 91040 [details] [review] Bug 23111: Set custom bibliographic framework as default This patch adds a new system preference (DefaultBibliographicFramework). Using this a librarian can select the bibliographic framework code to set the the bibliographic framework that will be displayed as default when: * Importing batch of biblio records * Editing a biblio record with no mapped biblio framework Test plan: 1. Apply patch 2. Run ./updatedatabase.pl (in installer/data/mysql) from the Koha shell to implement db changes 3. Search for the syspref DefaultBibliographicFramework in Administration module 4. Notice the syspref has the value 'Default' 5. Locate and edit the record of a bibliographic record not mapped to a framework and notice 'Default' is ticked when you click on 'Settings' 6. Click 'Save' and confirm the frameworkcode of the bibliorecord is Default (stored in the database as empty). You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 7. Import a batch of biblio records and notice that 'Default' is displayed as the framework to be used 8. Confirm the frameworkcode of one of the imported biblio records is default. Do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of biblio imported in step 7>; 9. Select a different framework (such as Acquisitions) in the DefaultBibliographicFramework syspref 10. Repeat step 5 but notice the DefaultBibliographicFramework framework as shown as the framework 11. Confirm the biblio has the new frameworkcode. You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 12. Repeat step 7 and notice the DefaultBibliographicFramework is shown as the framework to be used 13. Confirm the biblios imported in step 12 have the correct frameworkcode by running the following SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of imported biblio in step 12>; Authored-by: Alex Buckley Sponsored-by: Brimbank Library, Australia
(In reply to Owen Leonard from comment #2) > Also: Could we get the framework name to show in the system preference > instead of just the code? I don't think it's a dealbreaker but it would be > more user-friendly. The latest version of the patch fixes the QA tool warning and replaces the choice in the syspref with frameworktext instead of frameworkcode. Thanks for testing!
Created attachment 91791 [details] [review] Bug 23111: Set custom bibliographic framework as default This patch adds a new system preference (DefaultBibliographicFramework). Using this a librarian can select the bibliographic framework code to set the the bibliographic framework that will be displayed as default when: * Importing batch of biblio records * Editing a biblio record with no mapped biblio framework Test plan: 1. Apply patch 2. Run ./updatedatabase.pl (in installer/data/mysql) from the Koha shell to implement db changes 3. Search for the syspref DefaultBibliographicFramework in Administration module 4. Notice the syspref has the value 'Default' 5. Locate and edit the record of a bibliographic record not mapped to a framework and notice 'Default' is ticked when you click on 'Settings' 6. Click 'Save' and confirm the frameworkcode of the bibliorecord is Default (stored in the database as empty). You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 7. Import a batch of biblio records and notice that 'Default' is displayed as the framework to be used 8. Confirm the frameworkcode of one of the imported biblio records is default. Do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of biblio imported in step 7>; 9. Select a different framework (such as Acquisitions) in the DefaultBibliographicFramework syspref 10. Repeat step 5 but notice the DefaultBibliographicFramework framework as shown as the framework 11. Confirm the biblio has the new frameworkcode. You can do this by running the SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber>; 12. Repeat step 7 and notice the DefaultBibliographicFramework is shown as the framework to be used 13. Confirm the biblios imported in step 12 have the correct frameworkcode by running the following SQL: SELECT frameworkcode FROM biblio WHERE biblionumber=<biblionumber of imported biblio in step 12>; Authored-by: Alex Buckley Sponsored-by: Brimbank Library, Australia
I've rebased this commit against master and have re-attached it.
I'm sorry but this seems to me like a over-complicated approach: why don't we add a 'default' column with a boolean value to the biblio_framework table? Paired with a Koha::BiblioFramework->set_default method that unsets the previous default when called. And that's it? You will need Koha::BiblioFrameworks::get_default as well if you want to avoid crafting the query. in addbiblio.pl you use Koha::BiblioFramework (singular class) and you shouldn't. WE only include the plurals, which in turn include the singular.
Created attachment 92184 [details] [review] Bug 23111: (follow-up) Made Biblio::Framework use statements plural Follow-up based on comment #10 to use Koha::BiblioFrameworks in addbiblio.pl and cataloguing.pref.
(In reply to Tomás Cohen Arazi from comment #10) > I'm sorry but this seems to me like a over-complicated approach: why don't > we add a 'default' column with a boolean value to the biblio_framework table? > Paired with a Koha::BiblioFramework->set_default method that unsets the > previous default when called. And that's it? You will need > Koha::BiblioFrameworks::get_default as well if you want to avoid crafting > the query. > > in addbiblio.pl you use Koha::BiblioFramework (singular class) and you > shouldn't. WE only include the plurals, which in turn include the singular. Hi Tomás, Have included a follow-up patch to change the use statements to plural classes. We're looking into your suggestions now. How do you see the interface for this implemented? i.e. How should the librarians in your opinion set a framework to be the default?
(In reply to Tomás Cohen Arazi from comment #10) > I'm sorry but this seems to me like a over-complicated approach: why don't > we add a 'default' column with a boolean value to the biblio_framework table? Where would you put the configuration option then? On http://localhost:8081/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&frameworkcode=ACQ? NOTE: It looks like there is no way to Edit the default framework entry, so resetting from another framework to Default could be a problem.
These patches still apply cleanly. Setting to In Discussion as I think that's more appropriate. Tomás can you please answer Comment #13 when you get a chance?
*** Bug 20842 has been marked as a duplicate of this bug. ***
(In reply to Hayley Mapley from comment #12) > (In reply to Tomás Cohen Arazi from comment #10) > > I'm sorry but this seems to me like a over-complicated approach: why don't > > we add a 'default' column with a boolean value to the biblio_framework table? > > Paired with a Koha::BiblioFramework->set_default method that unsets the > > previous default when called. And that's it? You will need > > Koha::BiblioFrameworks::get_default as well if you want to avoid crafting > > the query. > > > > in addbiblio.pl you use Koha::BiblioFramework (singular class) and you > > shouldn't. WE only include the plurals, which in turn include the singular. > > Hi Tomás, > > Have included a follow-up patch to change the use statements to plural > classes. > > We're looking into your suggestions now. > > How do you see the interface for this implemented? > i.e. How should the librarians in your opinion set a framework to be the > default? A checkbox on the framework edit page. And a confirmation modal.
Created attachment 102602 [details] [review] Bug 23111: Set a custom framework as the default when importing records or editing records with no framework mapped. To test: 1) Go to edit a biblio with no framework mapped 2) Click the Settings dropdown, notice that the 'Default' framework is selected 3) Go to the Cataloguing home page. Click the main 'New from Z39.50/SRU' button and notice the selected framework in the URL is 'Default' 4) Go to Tools -> Stage MARC records for import. Stage a bibliographic record. Go to Staged MARC management for your newly imported batch. Notice that the frameworks dropdown (above the 'Import this batch into the catalog' button) has the 'Default' framework selected 5) Apply this patch and update the database. Apply the schema changes patch or update your schema files. Restart memcached and plack. 6) Go to Administration -> MARC bibliographic frameworks. Edit one of your custom frameworks. Set it as default by checking the checkbox and saving. 7) Edit a different custom framework and set this one as the default now. Confirm that the previous framework has been unset (the checkbox is no longer checked) as the default. 8) Repeat steps 1-4 and confirm that the selected framework is your newly set default framework, instead of the provided 'Default' framework. 9) Go back to Administration -> MARC bibliographic frameworks. Edit your default framework and unset it as default (uncheck the checkbox). Save. 10) Repeat steps 1-4 and confirm that the selected framework is the provided 'Default' framework again, so we can have no default custom framework if chosen. 11) Confirm the tests pass: t/db_dependent/Koha/BiblioFrameworks.t Sponsored-by: Catalyst IT
Created attachment 102603 [details] [review] Bug 23111: (follow-up) Schema changes
I'm getting his error when doing a search in cataloging (/cgi-bin/koha/cataloguing/addbooks.pl?q=blue): DBIx::Class::ResultSource::_resolve_join(): No such relationship marc_subfield_structures on AuthorisedValueCategory at /kohadevbox/koha/Koha/Objects.pm line 130 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
(In reply to Owen Leonard from comment #19) > I'm getting his error when doing a search in cataloging > (/cgi-bin/koha/cataloguing/addbooks.pl?q=blue): > > DBIx::Class::ResultSource::_resolve_join(): No such relationship > marc_subfield_structures on AuthorisedValueCategory at > /kohadevbox/koha/Koha/Objects.pm line 130 > at /usr/share/perl5/DBIx/Class/Exception.pm line 77 Sorry Owen I don't get this error. Perhaps some data problem? Setting back to Needs Signoff to see if someone else can confirm.
Hi, no problem searching, test pass, works. qa-tools complains FAIL installer/data/mysql/kohastructure.sql OK boolean_vs_tinyint OK charset_collate OK git manipulation FAIL tinyint_has_boolean_flag The new column biblio_framework.is_default is using TINYINT(1) as type but is not defined as boolean in the schema file (Koha/Schema/Result/BiblioFramework.pm), see the SQL12 coding guideline Why not use an smallint/int type? Seems like a false positive to me.
(In reply to Bernardo Gonzalez Kriegel from comment #21) > Hi, > no problem searching, test pass, works. > > qa-tools complains > FAIL installer/data/mysql/kohastructure.sql > OK boolean_vs_tinyint > OK charset_collate > OK git manipulation > FAIL tinyint_has_boolean_flag > The new column biblio_framework.is_default is using > TINYINT(1) as type but is not defined as boolean in the schema file > (Koha/Schema/Result/BiblioFramework.pm), see the SQL12 coding guideline > > Why not use an smallint/int type? > Seems like a false positive to me. See the coding guidelines on the Koha Community wiki about booleans: https://wiki.koha-community.org/wiki/Coding_Guidelines#SQL12:_Booleans I realise I have done this wrong so will fix it up anyway, but guidelines say to use tinyint.
Bug 12194 might be helpful here - I think it's a 'right' positive.
Created attachment 104058 [details] [review] Bug 23111: Schema changes If not testing on a sandbox, do not apply this patch. Instead, apply first patch, update dbix files, then apply final patch and test.
Created attachment 104059 [details] [review] Bug 23111: Making is_default a boolean flag
Created attachment 104060 [details] [review] Bug 23111: Set a custom framework as the default when importing records or editing records with no framework mapped. To test: 1) Go to edit a biblio with no framework mapped 2) Click the Settings dropdown, notice that the 'Default' framework is selected 3) Go to the Cataloguing home page. Click the main 'New from Z39.50/SRU' button and notice the selected framework in the URL is 'Default' 4) Go to Tools -> Stage MARC records for import. Stage a bibliographic record. Go to Staged MARC management for your newly imported batch. Notice that the frameworks dropdown (above the 'Import this batch into the catalog' button) has the 'Default' framework selected 5) Apply this patch and update the database. Apply the schema changes patch or update your schema files. Restart memcached and plack. 6) Go to Administration -> MARC bibliographic frameworks. Edit one of your custom frameworks. Set it as default by checking the checkbox and saving. 7) Edit a different custom framework and set this one as the default now. Confirm that the previous framework has been unset (the checkbox is no longer checked) as the default. 8) Repeat steps 1-4 and confirm that the selected framework is your newly set default framework, instead of the provided 'Default' framework. 9) Go back to Administration -> MARC bibliographic frameworks. Edit your default framework and unset it as default (uncheck the checkbox). Save. 10) Repeat steps 1-4 and confirm that the selected framework is the provided 'Default' framework again, so we can have no default custom framework if chosen. 11) Confirm the tests pass: t/db_dependent/Koha/BiblioFrameworks.t Sponsored-by: Catalyst IT Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 104061 [details] [review] Bug 23111: Schema changes If not testing on a sandbox, do not apply this patch. Instead, apply first patch, update dbix files, then apply final patch and test. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 104062 [details] [review] Bug 23111: Making is_default a boolean flag Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(In reply to Aleisha Amohia from comment #22) > See the coding guidelines on the Koha Community wiki about booleans: > https://wiki.koha-community.org/wiki/Coding_Guidelines#SQL12:_Booleans > > I realise I have done this wrong so will fix it up anyway, but guidelines > say to use tinyint. (In reply to Katrin Fischer from comment #23) > Bug 12194 might be helpful here - I think it's a 'right' positive. I read the coding guidelines, but didn't know if it was intended to be Boolean, so a type change would fix the problem. If that was the intention, it needed to be declared, and was a 'right' positive :) Tested and signed
Hi Aleisha, 1) At the moment you can't tell from the administration page, which is the current default framework. Could you add a column or note there to show the current default? (/cgi-bin/koha/admin/biblio_framework.pl). I think this would be really helpful. I wonder if a hint would be helpful "unset to make default default" (better phrased) as this might not be intuitive (no edit option for the default framework). 2) It looks like the advanced editor still defaults to default - should this be changed as well?
Created attachment 106560 [details] [review] Bug 23111: (QA follow-up) Add AFTER to update database statement
Created attachment 112354 [details] [review] Bug 23111: (follow-up) Add a column to show default framework
(In reply to Katrin Fischer from comment #30) > 2) It looks like the advanced editor still defaults to default - should this > be changed as well? I have implemented everything except this point, I'm not sure the best way to go about it!
Created attachment 112468 [details] [review] Bug 23111: (follow-up) set default framework on advanced editor This patch ensures the advanced editor considers the default biblio framework. Also fixing bug in atomic update
(In reply to Aleisha Amohia from comment #33) > (In reply to Katrin Fischer from comment #30) > > > 2) It looks like the advanced editor still defaults to default - should this > > be changed as well? > > I have implemented everything except this point, I'm not sure the best way > to go about it! I feel like the advanced editor is its own beast >_>.
Is the test from comment 26 still valid?
Created attachment 138766 [details] [review] Bug 23111: Set a custom framework as the default when importing records or editing records with no framework mapped. To test: 1) Go to edit a biblio with no framework mapped 2) Click the Settings dropdown, notice that the 'Default' framework is selected 3) Go to the Cataloguing home page. Click the main 'New from Z39.50/SRU' button and notice the selected framework in the URL is 'Default' 4) Go to Tools -> Stage MARC records for import. Stage a bibliographic record. Go to Staged MARC management for your newly imported batch. Notice that the frameworks dropdown (above the 'Import this batch into the catalog' button) has the 'Default' framework selected 5) Apply this patch and update the database. Apply the schema changes patch or update your schema files. Restart memcached and plack. 6) Go to Administration -> MARC bibliographic frameworks. Edit one of your custom frameworks. Set it as default by checking the checkbox and saving. 7) Edit a different custom framework and set this one as the default now. Confirm that the previous framework has been unset (the checkbox is no longer checked) as the default. 8) Repeat steps 1-4 and confirm that the selected framework is your newly set default framework, instead of the provided 'Default' framework. 9) Go back to Administration -> MARC bibliographic frameworks. Edit your default framework and unset it as default (uncheck the checkbox). Save. 10) Repeat steps 1-4 and confirm that the selected framework is the provided 'Default' framework again, so we can have no default custom framework if chosen. 11) Confirm the tests pass: t/db_dependent/Koha/BiblioFrameworks.t Sponsored-by: Catalyst IT Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 138767 [details] [review] Bug 23111: Schema changes
Created attachment 138768 [details] [review] Bug 23111: Making is_default a boolean flag Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 138769 [details] [review] Bug 23111: (follow-up) Add a column to show default framework
Created attachment 138770 [details] [review] Bug 23111: (follow-up) set default framework on advanced editor This patch ensures the advanced editor considers the default biblio framework. Also fixing bug in atomic update
Created attachment 141565 [details] [review] Bug 23111: Set a custom framework as the default when importing records or editing records with no framework mapped. To test: 1) Go to edit a biblio with no framework mapped 2) Click the Settings dropdown, notice that the 'Default' framework is selected 3) Go to the Cataloguing home page. Click the main 'New from Z39.50/SRU' button and notice the selected framework in the URL is 'Default' 4) Go to Tools -> Stage MARC records for import. Stage a bibliographic record. Go to Staged MARC management for your newly imported batch. Notice that the frameworks dropdown (above the 'Import this batch into the catalog' button) has the 'Default' framework selected 5) Apply this patch and update the database. Apply the schema changes patch or update your schema files. Restart memcached and plack. 6) Go to Administration -> MARC bibliographic frameworks. Edit one of your custom frameworks. Set it as default by checking the checkbox and saving. 7) Edit a different custom framework and set this one as the default now. Confirm that the previous framework has been unset (the checkbox is no longer checked) as the default. 8) Repeat steps 1-4 and confirm that the selected framework is your newly set default framework, instead of the provided 'Default' framework. 9) Go back to Administration -> MARC bibliographic frameworks. Edit your default framework and unset it as default (uncheck the checkbox). Save. 10) Repeat steps 1-4 and confirm that the selected framework is the provided 'Default' framework again, so we can have no default custom framework if chosen. 11) Confirm the tests pass: t/db_dependent/Koha/BiblioFrameworks.t Sponsored-by: Catalyst IT Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 141566 [details] [review] Bug 23111: Schema changes Signed-off-by: David Nind <david@davidnind.com>
Created attachment 141567 [details] [review] Bug 23111: Making is_default a boolean flag Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 141568 [details] [review] Bug 23111: (follow-up) Add a column to show default framework Signed-off-by: David Nind <david@davidnind.com>
Created attachment 141569 [details] [review] Bug 23111: (follow-up) set default framework on advanced editor This patch ensures the advanced editor considers the default biblio framework. Also fixing bug in atomic update Signed-off-by: David Nind <david@davidnind.com>
I've signed off as everything works as per the test plan. I enable the advanced editor (EnableAdvancedCatalogingEditor system preference) and this worked as expected with this change. I did note that in the staff interface when on the details page for an existing record, you have the option of New > New record - this defaults to the default framework even if another framework is set as the default. There may be other areas where /cgi-bin/koha/cataloguing/addbiblio.pl is used... possibly these can be addressed in a follow-up bug when these are identified, for example in the acquisitions area.
Giving this another round of testing: I have made the FA framework my default. This worked nicely. 1) Open a record that has been saved with ACQ framework. Try to switch to Default. The "Change framework" list will have the checkmark at "FA", but the display will be the default framework. Switching to other frameworks works, so it might have to do with the "" of default. 2) I feel we should fix that one David found and that I confirmed within this patch set. There are 2 'major' ways to create a new record (from cataloguing module and form detail page) and as this is one of them, I think it makes sense to have it part here: I did note that in the staff interface when on the details page for an existing record, you have the option of New > New record - this defaults to the default framework even if another framework is set as the default. 3) When a new record is created with "order from new" in acq, and UseACQFrameworkForBiblioRecords is set to Don't use, the record will be using "default". This is less blocker than 2, but if it's not an easy fix, we should file a bug for it. We've just recently had a request for this on the German mailing list, would love to see this make it into 22.11 :)
*** Bug 34703 has been marked as a duplicate of this bug. ***
Created attachment 157717 [details] [review] Bug 23111: Set a custom framework as the default when importing records or editing records with no framework mapped. To test: 1) Go to edit a biblio with no framework mapped 2) Click the Settings dropdown, notice that the 'Default' framework is selected 3) Go to the Cataloguing home page. Click the main 'New from Z39.50/SRU' button and notice the selected framework in the URL is 'Default' 4) Go to Tools -> Stage MARC records for import. Stage a bibliographic record. Go to Staged MARC management for your newly imported batch. Notice that the frameworks dropdown (above the 'Import this batch into the catalog' button) has the 'Default' framework selected 5) Apply this patch and update the database. Apply the schema changes patch or update your schema files. Restart memcached and plack. 6) Go to Administration -> MARC bibliographic frameworks. Edit one of your custom frameworks. Set it as default by checking the checkbox and saving. 7) Edit a different custom framework and set this one as the default now. Confirm that the previous framework has been unset (the checkbox is no longer checked) as the default. 8) Repeat steps 1-4 and confirm that the selected framework is your newly set default framework, instead of the provided 'Default' framework. 9) Go back to Administration -> MARC bibliographic frameworks. Edit your default framework and unset it as default (uncheck the checkbox). Save. 10) Repeat steps 1-4 and confirm that the selected framework is the provided 'Default' framework again, so we can have no default custom framework if chosen. 11) Confirm the tests pass: t/db_dependent/Koha/BiblioFrameworks.t Sponsored-by: Catalyst IT Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157718 [details] [review] Bug 23111: Schema changes
Created attachment 157719 [details] [review] Bug 23111: Making is_default a boolean flag Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157720 [details] [review] Bug 23111: (follow-up) Add a column to show default framework Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157721 [details] [review] Bug 23111: (follow-up) set default framework on advanced editor This patch ensures the advanced editor considers the default biblio framework. Also fixing bug in atomic update Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157722 [details] [review] Bug 23111: Allow switch to Default framework and use selected default when adding New record This ensures that the correct framework is checked when using the 'Change framework' dropdown in the editor. This also ensures that the selected default framework is used when using the New record button in the Cataloguing home page or from a record detail page. You would also still be able to use the Default framework if chosen. Sponsored-by: Catalyst IT
Created attachment 157723 [details] [review] Bug 23111: Use selected default framework if UseACQFrameworkForBiblioRecords set to Don't Use
Two issues I came across when testing (using KTD): 1. Cataloguing > New from Z39.50/SRU: framework in URL is Default, even if another framework (such as BKS) is set as the default: . 127.0.0.1:8081/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=&frameworkcode=Default 2. Page not found error for Cataloguing > New record, after unsetting the default framework (so that the Default framework is now the default): - URL is: http://127.0.0.1:8081/cgi-bin/koha/cataloguing/undefined - Error 404 page (An error has occurred)