Bug 38993 - Merge fetch files
Summary: Merge fetch files
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-29 16:05 UTC by Jonathan Druart
Modified: 2025-03-10 12:13 UTC (History)
5 users (show)

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


Attachments
Bug 38993: Merge 'fetch' directories (61.21 KB, patch)
2025-01-29 16:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (839 bytes, patch)
2025-01-29 16:35 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (743 bytes, patch)
2025-01-29 16:46 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: Merge 'fetch' directories (60.60 KB, patch)
2025-01-30 08:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (745 bytes, patch)
2025-01-30 08:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (3.84 KB, patch)
2025-01-30 08:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (1.96 KB, patch)
2025-01-30 08:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (1.91 KB, patch)
2025-01-30 09:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (4.57 KB, patch)
2025-01-30 09:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Merge 'fetch' directories (60.61 KB, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (802 bytes, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (2.01 KB, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (4.62 KB, patch)
2025-01-30 09:24 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38993: Merge 'fetch' directories (61.66 KB, patch)
2025-03-10 12:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (856 bytes, patch)
2025-03-10 12:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (2.01 KB, patch)
2025-03-10 12:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (4.62 KB, patch)
2025-03-10 12:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38993: Merge 'fetch' directories (61.73 KB, patch)
2025-03-10 12:13 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38993: (follow-up) Add 'fetch' alias to rspack config (921 bytes, patch)
2025-03-10 12:13 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38993: Use the @fetch alias (2.08 KB, patch)
2025-03-10 12:13 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 38993: Restore add patrons to list (4.69 KB, patch)
2025-03-10 12:13 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-01-29 16:05:41 UTC
We have "fetch" files in koha-tmpl/intranet-tmpl/prog/js/vue/fetch and koha-tmpl/intranet-tmpl/prog/js/fetch
The reason is hidden behind http-client and how we handle errors.
We should avoid the duplication of -api-client.js files between the two directories.
Comment 1 Jonathan Druart 2025-01-29 16:06:18 UTC Comment hidden (obsolete)
Comment 2 Paul Derscheid 2025-01-29 16:35:55 UTC Comment hidden (obsolete)
Comment 3 Paul Derscheid 2025-01-29 16:46:58 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2025-01-30 08:16:29 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2025-01-30 08:16:32 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2025-01-30 08:16:34 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2025-01-30 08:56:41 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2025-01-30 09:06:31 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2025-01-30 09:15:07 UTC Comment hidden (obsolete)
Comment 10 Paul Derscheid 2025-01-30 09:24:19 UTC Comment hidden (obsolete)
Comment 11 Paul Derscheid 2025-01-30 09:24:22 UTC Comment hidden (obsolete)
Comment 12 Paul Derscheid 2025-01-30 09:24:24 UTC Comment hidden (obsolete)
Comment 13 Paul Derscheid 2025-01-30 09:24:27 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2025-01-30 09:36:47 UTC
We should then discuss how we want to organize those files.

One thing that is wrong is the inconsistency in the use of plural vs singular:
additional-fields-api-client.js
cover-image-api-client.js
patron-api-client.js

We first had the modules, and so started with singular. Then we continue with all singular. But at some point plurals got introduced and now it's messy.

I would revert to all singular, but that's for another bug report.
Comment 15 Jonathan Druart 2025-02-13 09:40:05 UTC
Rebased version of the patches on my gitlab repo: "bug_38993-rebased".

Will attach the patch here soon, but keeping for some auto-rebase tests.
Comment 16 Marcel de Rooy 2025-03-07 10:22:29 UTC
(In reply to Jonathan Druart from comment #15)
> Rebased version of the patches on my gitlab repo: "bug_38993-rebased".
> 
> Will attach the patch here soon, but keeping for some auto-rebase tests.

We are patient :)
Comment 17 Jonathan Druart 2025-03-10 12:05:31 UTC Comment hidden (obsolete)
Comment 18 Jonathan Druart 2025-03-10 12:05:34 UTC Comment hidden (obsolete)
Comment 19 Jonathan Druart 2025-03-10 12:05:36 UTC Comment hidden (obsolete)
Comment 20 Jonathan Druart 2025-03-10 12:05:39 UTC Comment hidden (obsolete)
Comment 21 Martin Renvoize (ashimema) 2025-03-10 12:13:37 UTC
Created attachment 179106 [details] [review]
Bug 38993: Merge 'fetch' directories

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 22 Martin Renvoize (ashimema) 2025-03-10 12:13:39 UTC
Created attachment 179107 [details] [review]
Bug 38993: (follow-up) Add 'fetch' alias to rspack config

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 23 Martin Renvoize (ashimema) 2025-03-10 12:13:42 UTC
Created attachment 179108 [details] [review]
Bug 38993: Use the @fetch alias

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 24 Martin Renvoize (ashimema) 2025-03-10 12:13:45 UTC
Created attachment 179109 [details] [review]
Bug 38993: Restore add patrons to list

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>