Currently CSV profiles can be created with marc fields only. This feature will allow to create CSV profile for sql fields.
Created attachment 20956 [details] [review] Bug 10853: Add DB field export_format.type ('marc' or 'sql'). This patch: - adds a new column 'type' to the export_format table. - renames the field name export_format.marcfields with export_format.content. Feel free to propose another name. Test plan: - Check that existing profiles have the type "marc" selected by default - Create a new profile with a type "sql" - Save and verify the profile is correctly displayed when you select it.
Applying: Bug 10853: Add DB field export_format.type ('marc' or 'sql'). Using index info to reconstruct a base tree... M installer/data/mysql/kohastructure.sql M installer/data/mysql/updatedatabase.pl Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/kohastructure.sql Patch failed at 0001 Bug 10853: Add DB field export_format.type ('marc' or 'sql'). The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Created attachment 21183 [details] [review] Bug 10853: Add DB field export_format.type ('marc' or 'sql'). This patch: - adds a new column 'type' to the export_format table. - renames the field name export_format.marcfields with export_format.content. Feel free to propose another name. Test plan: - Check that existing profiles have the type "marc" selected by default - Create a new profile with a type "sql" - Save and verify the profile is correctly displayed when you select it.
Created attachment 21301 [details] [review] [SIGNED-OFF] Bug 10853: Add DB field export_format.type ('marc' or 'sql'). This patch: - adds a new column 'type' to the export_format table. - renames the field name export_format.marcfields with export_format.content. Feel free to propose another name. Test plan: - Check that existing profiles have the type "marc" selected by default - Create a new profile with a type "sql" - Save and verify the profile is correctly displayed when you select it. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Work as described. koha-qa reports Small tabs errors, corrected in followup Test: 1) go to Tools > CSVProfiles, Create profile, current 2) Apply patch, run updatedatabase 3) Go to Tools > CSVProfiles, new option present old profile with type MARC 4) Create new profile MARC, save and show correct 5) Create new profile SQL, save and show correct
Created attachment 21302 [details] [review] Bug 10853 - followup to correct tabs Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
I see 2 problems with this: 1) The new SQL based CSV profiles show up in the OPAC download list, but they don't seem to work there. I think we probably need something to differentiate where the CSV profiles are offered - maybe similar to the 'module' of letters? 2) When editing a CSV profile, it redirects to the 'empty' form after saving. It would be better if it remained on the edited CSV profile, so the changes can be checked. Continueing testing with the dependent bugs/patches to see which changes those include.
3) Biggest question of all - I think we need some kind of documentation which tables can be used where? The examples refer to fields related to issues and subscriptions, but so far we only had CSV profiles in context of downloading bibliographic information from OPAC and staff search results.
I think we need to solve 1) before we can start making wide use of this feature - showing non-functional CSV profiles in the OPAC could cause quite a lot of confusion. (It shows in the cart download option list)
(In reply to Katrin Fischer from comment #6) > I see 2 problems with this: > > 1) The new SQL based CSV profiles show up in the OPAC download list, but > they don't seem to work there. I think we probably need something to > differentiate where the CSV profiles are offered - maybe similar to the > 'module' of letters? Yes, good catch. I will fix that. > 2) When editing a CSV profile, it redirects to the 'empty' form after > saving. It would be better if it remained on the edited CSV profile, so the > changes can be checked. It is the current behavior. (In reply to Katrin Fischer from comment #7) > 3) Biggest question of all - I think we need some kind of documentation > which tables can be used where? The examples refer to fields related to > issues and subscriptions, but so far we only had CSV profiles in context of > downloading bibliographic information from OPAC and staff search results. I tried to do something quite reusable. This patch does not use the created sql csv profile. Bug 10854 allows to export a serial claim using a csv profile (instead of using the default one, which is not editable), so for this one fields from serials and subscription will be available. I don't know how/where can I document that.
Created attachment 21373 [details] [review] Bug 10853: All existing routing to get a CSV should return a marc csv Test plan: Verify that existing csv lists list marc csv profiles and not sql csv profiles.
Ok, I think this can go in, when the OPAC display is fixed. I am not sure how to document, but maybe if we had a 'module' flag or some other way to show where the CSV is used, we could have a note appearing that lists the tables? Or we could add it to the help file for that page.
Created attachment 21380 [details] [review] [PASSED QA] Bug 10853: Add DB field export_format.type ('marc' or 'sql'). This patch: - adds a new column 'type' to the export_format table. - renames the field name export_format.marcfields with export_format.content. Feel free to propose another name. Test plan: - Check that existing profiles have the type "marc" selected by default - Create a new profile with a type "sql" - Save and verify the profile is correctly displayed when you select it. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Work as described. koha-qa reports Small tabs errors, corrected in followup Test: 1) go to Tools > CSVProfiles, Create profile, current 2) Apply patch, run updatedatabase 3) Go to Tools > CSVProfiles, new option present old profile with type MARC 4) Create new profile MARC, save and show correct 5) Create new profile SQL, save and show correct Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass with all 3 patches applied. Works as described. Functionality for SQL profiles will be added by another patch. For now it's possible to add/edit/delete them. Existing CSV profiles can still be exported correctly.
Created attachment 21381 [details] [review] [PASSED QA] Bug 10853 - followup to correct tabs Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Created attachment 21382 [details] [review] [PASSED QA] Bug 10853: All existing routing to get a CSV should return a marc csv Test plan: Verify that existing csv lists list marc csv profiles and not sql csv profiles. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Pushed to master. Thanks, Jonathan!