Created attachment 48910 [details] more than one file type selection The MARC bibliographic framework Export is misbehaving for Default framework only 1) File will always export as an .ods file regardless of what file type you have selected 2) The first time that you click the Export button and choose a different file type other than CSV then click Cancel will be fine. Then, without refreshing the page, click Export for the same framework again and notice CSV radio selection is checked and stays checked when you select other file types. (See screenshot)
Some of this has been fixed (the radio buttons work as expected now), but the default framework only ever exports as .ods file.
Created attachment 54839 [details] [review] Bug 16035: MARC default bibliographic framework Export fix This patch makes sure that, if there is no framework code passed, then 'default' is passed. At the moment, no framework code was being passed so the code broke and triggered some warns too. To test: 1) Go to Admin -> MARC Bibliographic framework 2) Try to export default framework in all formats, notice the file is only exported as .ods and is an empty file. Notice warns in intranet error log. 3) Apply patch and refresh page 4) Confirm exporting default framework works in all formats and spreadsheet has data 5) Notice warns in error log are gone 6) Confirm export still works for other frameworks Sponsored-by: Catalyst IT
After applying the patch the export is triggered in the correct format, but it's still mostly empty. The CSV file, for instance, only has header information.
Created attachment 54898 [details] [review] Bug 16035: MARC default bibliographic framework Export fix This patch makes sure that, if there is no framework code, $frameworkcode is set to 'default'. This fixes the format issue. Then, if $frameworkcode = default, an empty string (rather than null) is passed to the ExportFramework method, as the framework code in the DB for default codes is "". To test: 1) Go to Admin -> MARC Bibliographic framework 2) Try to export default framework in all formats, notice the file is only exported as .ods and is an empty file. Notice warns in intranet error log. 3) Apply patch and refresh page 4) Confirm exporting default framework works in all formats and spreadsheet has data 5) Notice warns in error log are gone 6) Confirm export still works for other frameworks Sponsored-by: Catalyst IT
Created attachment 55039 [details] [review] [SIGNED-OFF] Bug 16035: MARC default bibliographic framework Export fix This patch makes sure that, if there is no framework code, $frameworkcode is set to 'default'. This fixes the format issue. Then, if $frameworkcode = default, an empty string (rather than null) is passed to the ExportFramework method, as the framework code in the DB for default codes is "". To test: 1) Go to Admin -> MARC Bibliographic framework 2) Try to export default framework in all formats, notice the file is only exported as .ods and is an empty file. Notice warns in intranet error log. 3) Apply patch and refresh page 4) Confirm exporting default framework works in all formats and spreadsheet has data 5) Notice warns in error log are gone 6) Confirm export still works for other frameworks Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 55142 [details] [review] Bug 16035: MARC default bibliographic framework Export fix This patch makes sure that, if there is no framework code, $frameworkcode is set to 'default'. This fixes the format issue. Then, if $frameworkcode = default, an empty string (rather than null) is passed to the ExportFramework method, as the framework code in the DB for default codes is "". To test: 1) Go to Admin -> MARC Bibliographic framework 2) Try to export default framework in all formats, notice the file is only exported as .ods and is an empty file. Notice warns in intranet error log. 3) Apply patch and refresh page 4) Confirm exporting default framework works in all formats and spreadsheet has data 5) Notice warns in error log are gone 6) Confirm export still works for other frameworks Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 16.11, thanks Aleisha!
> 6) Confirm export still works for other frameworks That did not work, see bug 17389 for a fix.
Pushed in 16.05. Will be in 16.05.05.
Pushed to 3.22.x, will be in 3.22.12
Caused bug 18111.