Bug 22614 - Request migration from one backend to another should not create new request
Summary: Request migration from one backend to another should not create new request
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Andrew Isherwood
QA Contact: Nick Clemens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-01 13:06 UTC by Andrew Isherwood
Modified: 2022-06-06 20:25 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 22614: Migrate original request (2.06 KB, patch)
2019-04-01 13:14 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 22614: Migrate original request (2.71 KB, patch)
2019-04-03 14:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 22614: Migrate original request (2.81 KB, patch)
2021-07-07 08:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 22614: Migrate original request (2.86 KB, patch)
2021-07-30 18:54 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Isherwood 2019-04-01 13:06:16 UTC
Currently, when requests are migrated from one backend to another, a new request is created containing the attributes of the existing one but with the backend set to the migration destination backend and the metadata is derived from the migration destination backend. The existing request is then marked as reverted and a record is made of where the request was migrated to.

The downside of this approach is that two requests now exist in the system, whereas in actual fact, it's still the same request. This can be problematic for statistics etc.

This bug proposes that request migration should preserve the original request and, instead, change its backend and replace the metadata from the original backend to that of the migration destination backend. Also, we should log where the request has been migrated from and to.
Comment 1 Andrew Isherwood 2019-04-01 13:14:04 UTC
Created attachment 87277 [details] [review]
Bug 22614: Migrate original request

This patch changes an active request's backend and initiates the
migration on that request, rather than creating another and migrating
that.

The majority of the work to accomplish this bug is being carried out in
the backends, since Koha delegates migrations to them.
Comment 2 Andrew Isherwood 2019-04-03 14:27:14 UTC
Created attachment 87357 [details] [review]
Bug 22614: Migrate original request

This patch changes an active request's backend and initiates the
migration on that request, rather than creating another and migrating
that.

The majority of the work to accomplish this bug is being carried out in
the backends, since Koha delegates migrations to them.
Comment 3 Andrew Isherwood 2019-04-04 09:43:39 UTC
Test plan:

- Apply the patch
- Install the FreeForm and BLDSS backends (note, these links are to the 'bug_22614_migrate_original_request' branches for these backends):
  - https://github.com/PTFS-Europe/koha-ill-bldss/tree/bug_22614_migrate_original_request
  - https://github.com/PTFS-Europe/koha-ill-freeform/tree/bug_22614_migrate_original_request
- Create a request using the FreeForm backend.
- On the "Manage request" screen, choose "Switch provider" > "BLDSS"
- Choose an appropriate search result from the BLDSS results
- TEST => Observe that the request is now displaying as originating from the BLDSS and containing metadata from the BLDSS.
- Choose "ILL request log"
- TEST => Observe that the log displays 'Status changed from "New request" to "Switched provider"'
- TEST => Observe that the log displays 'Switched provider from "FreeForm" to "BLDSS"'
- Create a request using the BLDSS backend.
- On the "Manage request" screen, choose "Switch provider" > "FreeForm"
- TEST => Observe that the request is now displaying as originating from FreeForm and has preserved the BLDSS metadata.
- Choose "ILL request log"
- TEST => Observe that the log displays 'Status changed from "New request" to "Switched provider"'
- TEST => Observe that the log displays 'Switched provider from "BLDSS" to "FreeForm"'
Comment 4 Martin Renvoize 2021-03-19 14:20:04 UTC
Still applies
Comment 5 Martin Renvoize 2021-07-07 08:43:35 UTC
Created attachment 122645 [details] [review]
Bug 22614: Migrate original request

This patch changes an active request's backend and initiates the
migration on that request, rather than creating another and migrating
that.

The majority of the work to accomplish this bug is being carried out in
the backends, since Koha delegates migrations to them.

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Assumpta Byrne <abyrne@ait.ie>
Comment 6 Nick Clemens 2021-07-30 18:54:31 UTC
Created attachment 123342 [details] [review]
Bug 22614: Migrate original request

This patch changes an active request's backend and initiates the
migration on that request, rather than creating another and migrating
that.

The majority of the work to accomplish this bug is being carried out in
the backends, since Koha delegates migrations to them.

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Assumpta Byrne <abyrne@ait.ie>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Jonathan Druart 2021-09-21 18:18:29 UTC
Pushed to master for 21.11, thanks to everybody involved!