Bug 25503 - Add option to export items bundle contents in checkouts table
Summary: Add option to export items bundle contents in checkouts table
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 28854
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-14 12:36 UTC by Julian Maurice
Modified: 2023-06-22 21:21 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/697
Text to go in the release notes:
Version(s) released in:
23.05.00


Attachments
Bug 25503: Add option to export items bundle contents in checkouts table (3.41 KB, patch)
2020-05-14 12:36 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 25503: Add option to export items bundle contents in checkouts table (3.72 KB, patch)
2022-09-23 12:49 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 25503: Add option to export items bundle contents in checkouts table (3.78 KB, patch)
2022-09-23 16:09 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 25503: Add option to export items bundle contents in checkouts table (3.84 KB, patch)
2022-10-02 09:56 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25503: Add option to export items bundle contents in checkouts table (3.90 KB, patch)
2022-10-27 13:46 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 25503: Make Koha::Exporter::Record tests pass with unimarc (8.28 KB, patch)
2022-11-04 08:57 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 25503: Add failing test for _get_biblio_for_export (1.38 KB, patch)
2022-11-04 08:57 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 25503: Make _get_biblio_for_export test pass (858 bytes, patch)
2022-11-04 08:57 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 25503: Add option to export items bundle contents in checkouts table (3.30 KB, patch)
2022-11-04 08:57 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 25503: Make Koha::Exporter::Record tests pass with unimarc (8.46 KB, patch)
2023-02-02 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25503: Add failing test for _get_biblio_for_export (1.56 KB, patch)
2023-02-02 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25503: Make _get_biblio_for_export test pass (1.02 KB, patch)
2023-02-02 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25503: Add option to export items bundle contents in checkouts table (3.79 KB, patch)
2023-02-02 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2020-05-14 12:36:10 UTC

    
Comment 1 Julian Maurice 2020-05-14 12:36:56 UTC
Created attachment 104879 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

This patch depends on bug 24023

Test plan:
1. Apply bug 24023 + this patch, run updatedatabase && update_dbix.
2. Enable system preference ExportCircHistory
3. Create a biblio record with one item
4. On the biblio details page, click on 'Edit -> Link elements'. Link at
   least one item
5. Check out the item created at step 3
6. In the checkouts table, check the box in column "Export",
   choose export format 'MARC with items', check "Export items bundle
   contents" and click on "Export" button
   The exported file should contain the biblio and item created at step
   3, but also the item linked at step 4 with its biblio record
Comment 2 Fridolin Somers 2021-03-15 15:50:44 UTC
Need signoff ?
Comment 3 Martin Renvoize 2022-05-16 14:29:50 UTC
This is on my target list to rebase against the 28854 reworking of the original code in 24023
Comment 4 Julian Maurice 2022-09-23 12:49:44 UTC
Created attachment 140901 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

Test plan:
1. Enable system preference ExportCircHistory
2. Create an item bundle (see bug 28854 comment 458)
3. Check out the item bundle
4. In the checkouts table, check the box in column "Export",
   choose export format 'MARC with items', check "Export items bundle
   contents" and click on "Export" button
   The exported file should contain the biblio and item created at step
   2, but also the biblio and items that are part of the bundle
Comment 5 Julian Maurice 2022-09-23 12:51:47 UTC
Patch rebased and reworked to work with bug 28854
Comment 6 Marie-Luce Laflamme 2022-09-23 15:06:53 UTC Comment hidden (obsolete)
Comment 7 Marie-Luce Laflamme 2022-09-23 16:08:05 UTC
It's work with these steps
Test plan:
1. Apply bug 25503
2. Enable system preference ExportCircHistory
2. Create an item bundle (see bug 28854 comment 458)
3. Check out the item bundle
4. In the checkouts table, check the box in column "Export",
   Below the checkout lists, choose export format 'MARC with items', check "Export items bundle contents" and click on "Export" button
The exported file should contain the biblio and item created at step
2, but also the biblio and items that are part of the bundle.
Comment 8 ByWater Sandboxes 2022-09-23 16:09:31 UTC
Created attachment 140956 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

Test plan:
1. Enable system preference ExportCircHistory
2. Create an item bundle (see bug 28854 comment 458)
3. Check out the item bundle
4. In the checkouts table, check the box in column "Export",
   choose export format 'MARC with items', check "Export items bundle
   contents" and click on "Export" button
   The exported file should contain the biblio and item created at step
   2, but also the biblio and items that are part of the bundle

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Comment 9 Victor Grousset/tuxayo 2022-09-23 16:23:10 UTC
Changing to Signed-off then. Thanks Marie-Luce :)
Comment 10 Katrin Fischer 2022-10-02 09:56:22 UTC
Created attachment 141206 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

Test plan:
1. Enable system preference ExportCircHistory
2. Create an item bundle (see bug 28854 comment 458)
3. Check out the item bundle
4. In the checkouts table, check the box in column "Export",
   choose export format 'MARC with items', check "Export items bundle
   contents" and click on "Export" button
   The exported file should contain the biblio and item created at step
   2, but also the biblio and items that are part of the bundle

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2022-10-02 09:57:20 UTC
This works nicely. Maybe the UI could improved a little bit to separate the options visually a little better, but not a blocker here.
Comment 12 Tomás Cohen Arazi 2022-10-27 12:49:30 UTC
Comment on attachment 141206 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

Review of attachment 141206 [details] [review]:
-----------------------------------------------------------------

::: Koha/Exporter/Record.pm
@@ +132,4 @@
>                  record       => $record,
>                  embed_items  => 1,
>                  biblionumber => $biblionumber,
> +                itemnumbers => $itemnumbers,

Could we have some test for this particular change that feels like fixing a bug? Thanks!
Comment 13 PTFS Europe Sandboxes 2022-10-27 13:46:40 UTC
Created attachment 142715 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

Test plan:
1. Enable system preference ExportCircHistory
2. Create an item bundle (see bug 28854 comment 458)
3. Check out the item bundle
4. In the checkouts table, check the box in column "Export",
   choose export format 'MARC with items', check "Export items bundle
   contents" and click on "Export" button
   The exported file should contain the biblio and item created at step
   2, but also the biblio and items that are part of the bundle

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Comment 14 Julian Maurice 2022-11-04 08:57:02 UTC
Created attachment 143165 [details] [review]
Bug 25503: Make Koha::Exporter::Record tests pass with unimarc
Comment 15 Julian Maurice 2022-11-04 08:57:07 UTC
Created attachment 143166 [details] [review]
Bug 25503: Add failing test for _get_biblio_for_export
Comment 16 Julian Maurice 2022-11-04 08:57:12 UTC
Created attachment 143167 [details] [review]
Bug 25503: Make _get_biblio_for_export test pass
Comment 17 Julian Maurice 2022-11-04 08:57:16 UTC
Created attachment 143168 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

Test plan:
1. Enable system preference ExportCircHistory
2. Create an item bundle (see bug 28854 comment 458)
3. Check out the item bundle
4. In the checkouts table, check the box in column "Export",
   choose export format 'MARC with items', check "Export items bundle
   contents" and click on "Export" button
   The exported file should contain the biblio and item created at step
   2, but also the biblio and items that are part of the bundle

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Comment 18 Danyon Sewell 2023-01-10 21:32:08 UTC
(In reply to Julian Maurice from comment #17)
> Created attachment 143168 [details] [review] [review]
> Bug 25503: Add option to export items bundle contents in checkouts table
> 
> Test plan:
> 1. Enable system preference ExportCircHistory
> 2. Create an item bundle (see bug 28854 comment 458)
> 3. Check out the item bundle
> 4. In the checkouts table, check the box in column "Export",
>    choose export format 'MARC with items', check "Export items bundle
>    contents" and click on "Export" button
>    The exported file should contain the biblio and item created at step
>    2, but also the biblio and items that are part of the bundle
> 
> Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
> 
> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
> 
> Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>

> Signed-off-by: Danyon Sewell <danyonsewell@catalyst.net.nz>
Comment 19 Victor Grousset/tuxayo 2023-01-12 23:27:25 UTC
Thanks Danyon for testing :)

To completely make a signoff, see this page:
https://wiki.koha-community.org/wiki/Sign_off_on_patches

The quickest method might be to create a sandbox, apply the patches to it, and directly[1] on the sandboxes management interface do "actions" => "signoff patches".
And it will directly add your signoff to all the patches and reattach them here.

Whichever method you choose, feel free to ask for help if something looks wrong in the chat or the general list.
https://koha-community.org/get-involved/irc/
https://koha-community.org/support/koha-mailing-lists/


[1] no need to actually test them again on the sandbox since you already tested them locally
Comment 20 Martin Renvoize 2023-02-02 14:18:15 UTC
Created attachment 146005 [details] [review]
Bug 25503: Make Koha::Exporter::Record tests pass with unimarc

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=25508
Comment 21 Martin Renvoize 2023-02-02 14:18:21 UTC
Created attachment 146006 [details] [review]
Bug 25503: Add failing test for _get_biblio_for_export

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=25508
Comment 22 Martin Renvoize 2023-02-02 14:18:26 UTC
Created attachment 146007 [details] [review]
Bug 25503: Make _get_biblio_for_export test pass

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=25508
Comment 23 Martin Renvoize 2023-02-02 14:18:32 UTC
Created attachment 146008 [details] [review]
Bug 25503: Add option to export items bundle contents in checkouts table

Test plan:
1. Enable system preference ExportCircHistory
2. Create an item bundle (see bug 28854 comment 458)
3. Check out the item bundle
4. In the checkouts table, check the box in column "Export",
   choose export format 'MARC with items', check "Export items bundle
   contents" and click on "Export" button
   The exported file should contain the biblio and item created at step
   2, but also the biblio and items that are part of the bundle

Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=25508
Comment 24 Martin Renvoize 2023-02-02 14:21:57 UTC
All working as described.. QA scripts are happy and this adds some nice cleanup and improvements to the unit tests.

Whilst I would have loved to see the bundle handling code in a module rather than at the controller, I understand why you did it this way in this case.

Passing QA
Comment 25 Tomás Cohen Arazi 2023-05-10 18:28:20 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 26 Matt Blenkinsop 2023-05-15 10:39:38 UTC
Enhancement - not backporting to 22.11.x