Description
Jonathan Druart
2014-11-26 15:42:07 UTC
Created attachment 34013 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Not that subtitles are not displayed in all these cases. Note for QA: This patch refactors 3 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Not that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl 3/ Build the subject and body of the email sent Same as before, the job was done at the same places. Now it's done in Koha::Email->fill_body_for_sending (feel free to suggestion a better name) and tests are provided in t/Koha_Email.t Some tests for BuildBiblioDataForExport can fail if bug 13360 is not pushed yet. Jonathan: can you add a "Sponsored-by: Mines Paristech" in the patch ? thus, MPT will appear in the credits Created attachment 34392 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email Created attachment 35509 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email Created attachment 36270 [details] [review] [SIGNED-OFF] Bug 13345: Allow patrons to choose format on sending basket/list by email QA: Looking at this one now. CONFLICT (content): Merge conflict in opac/opac-sendbasket.pl CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt CONFLICT (content): Merge conflict in basket/sendbasket.pl Created attachment 38032 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email Conflict with bug 13695 fixed. Now it's also possible to send basket/cart using the ISBD format Hi Marcel, you started on this a while ago - do you want to continue or is it ok to change the QA contact? Patches apply now. (In reply to Katrin Fischer from comment #10) > Hi Marcel, you started on this a while ago - do you want to continue or is > it ok to change the QA contact? Patches apply now. Go ahead if you want to QA this one.. Jonathan, there are some conflicts - can you please take a look and fix? Applying: Bug 13345: Allow patrons to choose format on sending basket/list by email Using index info to reconstruct a base tree... M C4/Biblio.pm M basket/basket.pl M basket/downloadcart.pl M basket/sendbasket.pl M koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasket.tt M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelfform.tt M opac/opac-downloadcart.pl M opac/opac-downloadshelf.pl M opac/opac-sendbasket.pl M opac/opac-sendshelf.pl M virtualshelves/downloadshelf.pl M virtualshelves/sendshelf.pl Falling back to patching base and 3-way merge... Auto-merging virtualshelves/sendshelf.pl CONFLICT (content): Merge conflict in virtualshelves/sendshelf.pl Auto-merging virtualshelves/downloadshelf.pl Auto-merging opac/opac-sendshelf.pl CONFLICT (content): Merge conflict in opac/opac-sendshelf.pl Auto-merging opac/opac-sendbasket.pl CONFLICT (content): Merge conflict in opac/opac-sendbasket.pl Auto-merging opac/opac-downloadshelf.pl Auto-merging opac/opac-downloadcart.pl Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelfform.tt Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasket.tt Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt Auto-merging basket/sendbasket.pl CONFLICT (content): Merge conflict in basket/sendbasket.pl Auto-merging basket/downloadcart.pl Auto-merging basket/basket.pl Auto-merging C4/Biblio.pm Failed to merge in the changes. Patch failed at 0001 Bug 13345: Allow patrons to choose format on sending basket/list by email The copy of the patch that failed is found in: /home/katrin/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Created attachment 47297 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Not that subtitles are not displayed in all these cases. Note for QA: This patch refactors 3 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Not that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl 3/ Build the subject and body of the email sent Same as before, the job was done at the same places. Now it's done in Koha::Email->fill_body_for_sending (feel free to suggestion a better name) and tests are provided in t/Koha_Email.t Some tests for BuildBiblioDataForExport can fail if bug 13360 is not pushed yet. Sponsored-by: Mines Paristech Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Patch rebased on master I am sorry, conflicting again: CONFLICT (content): Merge conflict in virtualshelves/sendshelf.pl Auto-merging opac/opac-sendshelf.pl CONFLICT (content): Merge conflict in opac/opac-sendshelf.pl Auto-merging opac/opac-sendbasket.pl CONFLICT (content): Merge conflict in opac/opac-sendbasket.pl Auto-merging opac/opac-downloadshelf.pl Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasket.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt Auto-merging basket/sendbasket.pl CONFLICT (content): Merge conflict in basket/sendbasket.pl Will return to this asap when rebased. Created attachment 56499 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Not that subtitles are not displayed in all these cases. Note for QA: This patch refactors 3 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Not that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl 3/ Build the subject and body of the email sent Same as before, the job was done at the same places. Now it's done in Koha::Email->fill_body_for_sending (feel free to suggestion a better name) and tests are provided in t/Koha_Email.t Sponsored-by: Mines Paristech Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Created attachment 61210 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Not that subtitles are not displayed in all these cases. Note for QA: This patch refactors 3 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Not that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl 3/ Build the subject and body of the email sent Same as before, the job was done at the same places. Now it's done in Koha::Email->fill_body_for_sending (feel free to suggestion a better name) and tests are provided in t/Koha_Email.t Sponsored-by: Mines Paristech Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> # Subtest: iso2709 1..7 ok 1 - BuildBiblioDataForExport should return a correct records file in iso2709 ok 2 ok 3 - 499 and 462 ok 4 ok 5 - 1 item ok 6 - 0 author ok 7 - bibionumber is correct Please add test descriptions # Subtest: ris 1..1 Use of uninitialized value in numeric ne (!=) at /usr/share/koha/masterclone/C4/Ris.pm line 834. Use of uninitialized value in numeric ne (!=) at /usr/share/koha/masterclone/C4/Ris.pm line 834. not ok 1 # Failed test at t/db_dependent/Biblio/BuildBiblioDataForExport.t line 68. # got: 'TY - BOOK # AU - Knuth,Donald Ervin # TI - The art of computer programming # KW - Computer programming # KW - Computer algorithms # ER - # ' # expected: 'TY - BOOK # AU - Knuth, Donald Ervin # TI - The art of computer programming # KW - Computer programming # KW - Computer algorithms # ER - # ' # Looks like you failed 1 test of 1. # Subtest: bibtex 1..1 not ok 1 # Failed test at t/db_dependent/Biblio/BuildBiblioDataForExport.t line 77. # got: '@book{1945, # author = {Knuth, Donald Ervin}, # title = {The art of computer programming} # } # ' # expected: '@book{1945, # author = {Knuth, Donald Ervin}, # title = {The art of computer programming} # } # ' # Looks like you failed 1 test of 1. Can't locate object method "biblionumber" via package "41" (perhaps you forgot to load "41"?) at /usr/share/koha/masterclone/virtualshelves/sendshelf.pl line 76 Both opac-sendshelf and virtualshelves/sendshelf.pl contain this statement: my $biblionumber = $content->biblionumber->biblionumber; Is not correct. Also please add your signoff to the original patch. And/or add follow-ups. (In reply to Marcel de Rooy from comment #21) > Can't locate object method "biblionumber" via package "41" (perhaps you > forgot to load "41"?) at > /usr/share/koha/masterclone/virtualshelves/sendshelf.pl line 76 > > Both opac-sendshelf and virtualshelves/sendshelf.pl contain this statement: > my $biblionumber = $content->biblionumber->biblionumber; > Is not correct. Because of bug 17094. About the test failures, I guess we will adjust the tests as it is certainly not this patch that make them fail, but it looks like a Koha regression then. I am pretty sure the tests passed when I wrote them. Created attachment 100886 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Note that subtitles are not displayed in all these cases. Note for QA: This patch refactors 3 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Not that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl 3/ Build the subject and body of the email sent Same as before, the job was done at the same places. Now it's done in Koha::Email->fill_body_for_sending (feel free to suggestion a better name) and tests are provided in t/Koha_Email.t Sponsored-by: Mines Paristech Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Patch rebased on master. prove t/db_dependent/Biblio/BuildBiblioDataForExport.t t/db_dependent/Biblio/BuildBiblioDataForExport.t .. 1/4 Use of uninitialized value in numeric ne (!=) at /kohadevbox/koha/C4/Ris.pm line 833. Use of uninitialized value in numeric ne (!=) at /kohadevbox/koha/C4/Ris.pm line 833. # Failed test at t/db_dependent/Biblio/BuildBiblioDataForExport.t line 68. # got: 'TY - BOOK # AU - Knuth,Donald Ervin # TI - The art of computer programming # KW - Computer programming # KW - Computer algorithms # ER - # ' # expected: 'TY - BOOK # AU - Knuth, Donald Ervin # TI - The art of computer programming # KW - Computer programming # KW - Computer algorithms # ER - # ' # Looks like you failed 1 test of 1. # Failed test 'ris' # at t/db_dependent/Biblio/BuildBiblioDataForExport.t line 69. # Failed test at t/db_dependent/Biblio/BuildBiblioDataForExport.t line 77. # got: '@book{440, # author = {Knuth, Donald Ervin}, # title = {The art of computer programming} # } # ' # expected: '@book{440, # author = {Knuth, Donald Ervin}, # title = {The art of computer programming} # } # ' # Looks like you failed 1 test of 1. # Failed test 'bibtex' # at t/db_dependent/Biblio/BuildBiblioDataForExport.t line 82. # Looks like you failed 2 tests of 4. t/db_dependent/Biblio/BuildBiblioDataForExport.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/4 subtests Test Summary Report ------------------- t/db_dependent/Biblio/BuildBiblioDataForExport.t (Wstat: 512 Tests: 4 Failed: 2) Failed tests: 3-4 Non-zero exit status: 2 Files=1, Tests=4, 3 wallclock secs ( 0.02 usr 0.01 sys + 1.46 cusr 0.27 csys = 1.76 CPU) Result: FAIL Created attachment 101998 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Note that subtitles are not displayed in all these cases. Note for QA: This patch refactors 3 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Not that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl 3/ Build the subject and body of the email sent Same as before, the job was done at the same places. Now it's done in Koha::Email->fill_body_for_sending (feel free to suggestion a better name) and tests are provided in t/Koha_Email.t Sponsored-by: Mines Paristech Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Created attachment 101999 [details] [review] Bug 13345: Fix BuildBiblioDataForExport tests This is quite an old patch that changes more files than you'd think at first glance. We got a sign-off from Nicole here, but it's from March 2015. Hope it's ok, but I'd like to ask for a new sign off here. Tests pass and QA script too - I like to see the amount of 'red' (removed code) too. Created attachment 103433 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Note that subtitles are not displayed in all these cases. Note for QA: This patch refactors 3 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Not that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl 3/ Build the subject and body of the email sent Same as before, the job was done at the same places. Now it's done in Koha::Email->fill_body_for_sending (feel free to suggestion a better name) and tests are provided in t/Koha_Email.t Sponsored-by: Mines Paristech Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Test pass and mail sent, no errors. But a follow-up to remove useless call to GetMember is needed for email list to work. Created attachment 103434 [details] [review] Bug 13345: Fix BuildBiblioDataForExport tests Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Created attachment 103435 [details] [review] Bug 13345: follow-up remove call to GetMember This followup removes a forgotten call to GetMember (In reply to Katrin Fischer from comment #28) > This is quite an old patch that changes more files than you'd think at first > glance. We got a sign-off from Nicole here, but it's from March 2015. Hope > it's ok, but I'd like to ask for a new sign off here. > > Tests pass and QA script too - I like to see the amount of 'red' (removed > code) too. Signed both patches, but sending a list by email fails because there is a forgotten call to GetMember, follow-up added Falling back to patching base and 3-way merge... Auto-merging virtualshelves/sendshelf.pl CONFLICT (content): Merge conflict in virtualshelves/sendshelf.pl Auto-merging virtualshelves/downloadshelf.pl CONFLICT (modify/delete): t/Koha_Email.t deleted in HEAD and modified in Bug 13345: Allow patrons to choose format on sending basket/list by email. Version Bug 13345: Allow patrons to choose format on sending basket/list by email of t/Koha_Email.t left in tree. Auto-merging opac/opac-sendshelf.pl CONFLICT (content): Merge conflict in opac/opac-sendshelf.pl Auto-merging opac/opac-sendbasket.pl CONFLICT (content): Merge conflict in opac/opac-sendbasket.pl Auto-merging opac/opac-downloadshelf.pl Auto-merging opac/opac-downloadcart.pl Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelfform.tt Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt Auto-merging basket/sendbasket.pl CONFLICT (content): Merge conflict in basket/sendbasket.pl Auto-merging basket/downloadcart.pl Auto-merging basket/basket.pl Auto-merging Koha/Email.pm CONFLICT (content): Merge conflict in Koha/Email.pm Auto-merging C4/Biblio.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 13345: Allow patrons to choose format on sending basket/list by email The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-13345-Allow-patrons-to-choose-format-on-sendin-QUTNYW.patch Created attachment 119078 [details] [review] Bug 13345: Allow patrons to choose format on sending basket/list by email It is already possible to download a basket(cart) or a list using different format. But by email, only iso2709 is possible. This patch adds the ability to select a format for the file attached to the email when sending the basket/list content. Test plan: 1/ At the OPAC, add some records to your basket and send it by email using different formats (RIS, BibTeX, MARC and the CSV profiles defined). 2/ At the OPAC, add some records to a list and send it by email using the different formats. 3/ Redo step 1 at the intranet 4/ Redo step 2 at the intranet Note that subtitles are not displayed in all these cases. Note for QA: This patch refactors 2 main things: 1/ Template side: the dropdown list to select the format is now in an include file (indeed, this list is used in 4 templates, this will make easier further changes). The include files are named 'download-export-available-formats.inc', feel free to suggest something better. The are used in: [opac-]sendbasket.tt, [opac-]sendshelf.tt, [opac-]downloadbasket.tt and [opac-]downloadshelf.tt. 2/ Build records data and the records file This job was done in 4 scripts: - opac/opac-sendbasket.pl - opac/opac-sendshelf.pl - basket/sendbasket.pl - virtualshelves/sendshelf.pl Now it's done in C4::Biblio::BuildBiblioDataForExport and tests are provided in t/db_dependent/Biblio/BuildBiblioDataForExport.t Note that a similar job is done in [opac-]downloadcart.pl and [opac-]downloadshelf.pl Sponsored-by: Mines Paristech Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Test pass and mail sent, no errors. |