Bug 39934 - Standard backend shows attributes from previously "migrated from" backends
Summary: Standard backend shows attributes from previously "migrated from" backends
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-19 10:36 UTC by Pedro Amorim
Modified: 2025-05-19 10:46 UTC (History)
2 users (show)

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


Attachments
Bug 39934: Only fetch attributes from 'Standard' (1.63 KB, patch)
2025-05-19 10:44 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 39934: Use _get_core_fields as fields to be migrated (1.03 KB, patch)
2025-05-19 10:44 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 39934: Add tests (5.50 KB, patch)
2025-05-19 10:44 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2025-05-19 10:36:45 UTC

    
Comment 1 Pedro Amorim 2025-05-19 10:44:39 UTC
Created attachment 182581 [details] [review]
Bug 39934: Only fetch attributes from 'Standard'

Furthermore, this now only shows metadata present in _get_core_fields,
so a list of attributes to ignore is not longer needed (they're not in
_get_core_fields).
Comment 2 Pedro Amorim 2025-05-19 10:44:42 UTC
Created attachment 182582 [details] [review]
Bug 39934: Use _get_core_fields as fields to be migrated

Instead of ignoring from an arbitrary list
Comment 3 Pedro Amorim 2025-05-19 10:44:44 UTC
Created attachment 182583 [details] [review]
Bug 39934: Add tests

prove t/db_dependent/Koha/ILL/Backend/Standard.t

Test plan, k-t-d, don't apply patches yet:
1) Enable ILLModule sys pref
2) Install an additional backend, e.g. ReprintsDesk:
https://github.com/openfifth/koha-ill-reprintsdesk/releases/tag/v3.0.2
3) Restart plack
$ koha-plack --restart kohadev
4) Create a new ReprintsDesk request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=ReprintsDesk
5) Enter DOI: '123', EISSN: 'abc', a cardnumber '42' and a library. Click 'Make request'
6) Click 'Switch provider'. Pick 'Standard'.
7) Notice 'Eissn' shows. This is confusing as it means nothing in the 'Standard' context. 'Migrated from' is also shown and is equally as confusing for staff members (This is a remnant of previous behavior when migrating a request would create a new request).
8) Apply patches. Repeat test plan. The attributes from the previous backend still exist in the database, but the UI now only shows attributes relevant to the current backend of the request. To confirm this, run:
$ koha-mysql kohadev
$ select * from illrequestattributes;