Bug 19380

Summary: Add transfer informations in ILS-DI GetRecords response
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: Web servicesAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, josef.moravec, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 19380: Add transfer informations in ILS-DI GetRecords response
Bug 19380: Add transfer informations in ILS-DI GetRecords response
Bug 19380: Add transfer informations in ILS-DI GetRecords response
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers
Bug 19380: Add transfer informations in ILS-DI GetRecords response
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers
Bug 19380: Add transfer informations in ILS-DI GetRecords response
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers

Description Julian Maurice 2017-09-28 10:04:41 UTC

    
Comment 1 Julian Maurice 2017-09-28 10:05:31 UTC
Created attachment 67427 [details] [review]
Bug 19380: Add transfer informations in ILS-DI GetRecords response

Test plan:
1. Put an item into a 'transfer' state
  a. Place a hold on an item in branch A for a patron of branch B
  b. Check in this item in branch A and confirm transfer
2. Go to http://opac/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=XXX
   where XXX is the biblionumber of the biblio the item belongs to.
3. Verify you have a new <transfer> element inside //record/items/item
   that contains <datesent>, <frombranch> and <tobranch>
4. Check in the same item in branch B, so that the item is not flagged
   as being transferred
5. Repeat 2
6. Verify that the <transfer> element is not there.
7. prove t/db_dependent/ILSDI_Services.t
Comment 2 Alex Buckley 2017-10-03 21:14:32 UTC
Created attachment 67577 [details] [review]
Bug 19380: Add transfer informations in ILS-DI GetRecords response

Test plan:
1. Put an item into a 'transfer' state
  a. Place a hold on an item in branch A for a patron of branch B
  b. Check in this item in branch A and confirm transfer
2. Go to http://opac/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=XXX
   where XXX is the biblionumber of the biblio the item belongs to.
3. Verify you have a new <transfer> element inside //record/items/item
   that contains <datesent>, <frombranch> and <tobranch>
4. Check in the same item in branch B, so that the item is not flagged
   as being transferred
5. Repeat 2
6. Verify that the <transfer> element is not there.
7. prove t/db_dependent/ILSDI_Services.t

Followed test plan, patch worked as described. Also ran QA test tools
and modified files passed

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 3 Josef Moravec 2017-12-22 15:29:40 UTC
Comment on attachment 67577 [details] [review]
Bug 19380: Add transfer informations in ILS-DI GetRecords response

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

::: C4/ILSDI/Services.pm
@@ +239,5 @@
>              my $holding_library = Koha::Libraries->find( $item->{holdingbranch} );
>              $item->{'homebranchname'}    = $home_library    ? $home_library->branchname    : '';
>              $item->{'holdingbranchname'} = $holding_library ? $holding_library->branchname : '';
> +
> +            my ($transferDate, $transferFrom, $transferTo) = GetTransfers($item->{itemnumber});

You should use Koha::Item->get_transfer instead
Comment 4 Fridolin Somers 2018-05-09 13:39:09 UTC
Also needs rebase because of Bug 13990 (QA follow-up) Add unit test coverage
Comment 5 Julian Maurice 2019-03-19 13:17:09 UTC
Created attachment 86740 [details] [review]
Bug 19380: Add transfer informations in ILS-DI GetRecords response

Test plan:
1. Put an item into a 'transfer' state
  a. Place a hold on an item in branch A for a patron of branch B
  b. Check in this item in branch A and confirm transfer
2. Go to http://opac/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=XXX
   where XXX is the biblionumber of the biblio the item belongs to.
3. Verify you have a new <transfer> element inside //record/items/item
   that contains <datesent>, <frombranch> and <tobranch>
4. Check in the same item in branch B, so that the item is not flagged
   as being transferred
5. Repeat 2
6. Verify that the <transfer> element is not there.
7. prove t/db_dependent/ILSDI_Services.t

Followed test plan, patch worked as described. Also ran QA test tools
and modified files passed

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 6 Julian Maurice 2019-03-19 13:17:13 UTC
Created attachment 86741 [details] [review]
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers
Comment 7 Julian Maurice 2019-03-19 13:18:09 UTC
Patch rebased on master + comment 3 addressed
Comment 8 Josef Moravec 2019-03-20 13:51:49 UTC
Created attachment 86800 [details] [review]
Bug 19380: Add transfer informations in ILS-DI GetRecords response

Test plan:
1. Put an item into a 'transfer' state
  a. Place a hold on an item in branch A for a patron of branch B
  b. Check in this item in branch A and confirm transfer
2. Go to http://opac/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=XXX
   where XXX is the biblionumber of the biblio the item belongs to.
3. Verify you have a new <transfer> element inside //record/items/item
   that contains <datesent>, <frombranch> and <tobranch>
4. Check in the same item in branch B, so that the item is not flagged
   as being transferred
5. Repeat 2
6. Verify that the <transfer> element is not there.
7. prove t/db_dependent/ILSDI_Services.t

Followed test plan, patch worked as described. Also ran QA test tools
and modified files passed

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 9 Josef Moravec 2019-03-20 13:51:52 UTC
Created attachment 86801 [details] [review]
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 10 Nick Clemens 2019-03-28 17:56:17 UTC
tests need a rebase
Comment 11 Julian Maurice 2019-03-29 12:19:42 UTC
Created attachment 87187 [details] [review]
Bug 19380: Add transfer informations in ILS-DI GetRecords response

Test plan:
1. Put an item into a 'transfer' state
  a. Place a hold on an item in branch A for a patron of branch B
  b. Check in this item in branch A and confirm transfer
2. Go to http://opac/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=XXX
   where XXX is the biblionumber of the biblio the item belongs to.
3. Verify you have a new <transfer> element inside //record/items/item
   that contains <datesent>, <frombranch> and <tobranch>
4. Check in the same item in branch B, so that the item is not flagged
   as being transferred
5. Repeat 2
6. Verify that the <transfer> element is not there.
7. prove t/db_dependent/ILSDI_Services.t

Followed test plan, patch worked as described. Also ran QA test tools
and modified files passed

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 12 Julian Maurice 2019-03-29 12:19:54 UTC
Created attachment 87188 [details] [review]
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 13 Julian Maurice 2019-03-29 12:20:13 UTC
Patches rebased on master
Comment 14 Nick Clemens 2019-03-29 13:53:07 UTC
Awesome work all!

Pushed to master for 19.05
Comment 15 Martin Renvoize 2019-04-15 10:29:46 UTC
Enhancement will not be backported to 18.11.x series.