Bug 37850

Summary: branchillemail missing from public libraries REST endpoint
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: REST APIAssignee: Pedro Amorim <pedro.amorim>
Status: RESOLVED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: kyle, lucas, martin.renvoize, maryse.simard, pedro.amorim, phil, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds the library's e-mail address for interlibrary loans to the following public REST API endpoint's response: <opac_url>/api/v1/public/libraries
Version(s) released in:
24.11.00
Circulation function:
Attachments: Bug 37850: Add branchillemail to libraries public REST endpoint
Bug 37850: Add branchillemail to libraries public REST endpoint
Bug 37850: Add branchillemail to libraries public REST endpoint
Bug 37850: (QA follow-up): Update illemail REST API attribute name

Description Pedro Amorim 2024-09-05 18:46:53 UTC

    
Comment 1 Pedro Amorim 2024-09-05 18:48:43 UTC
Created attachment 171102 [details] [review]
Bug 37850: Add branchillemail to libraries public REST endpoint

To test, before applying patch:
1) Visit <opac_url>/api/v1/public/libraries
2) Notice illemail is not shown for each library
3) Apply patch. Restart plack
4) Repeat 1). Notice illemail is now shown for each library
Comment 2 Maryse Simard 2024-09-26 18:01:30 UTC
Created attachment 172000 [details] [review]
Bug 37850: Add branchillemail to libraries public REST endpoint

To test, before applying patch:
1) Visit <opac_url>/api/v1/public/libraries
2) Notice illemail is not shown for each library
3) Apply patch. Restart plack
4) Repeat 1). Notice illemail is now shown for each library

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 3 Kyle M Hall (khall) 2024-09-26 18:14:13 UTC
Created attachment 172003 [details] [review]
Bug 37850: Add branchillemail to libraries public REST endpoint

To test, before applying patch:
1) Visit <opac_url>/api/v1/public/libraries
2) Notice illemail is not shown for each library
3) Apply patch. Restart plack
4) Repeat 1). Notice illemail is now shown for each library

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Katrin Fischer 2024-10-21 10:27:21 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Katrin Fischer 2024-10-21 11:14:27 UTC
I am not a big fan of illemail as the name for the API, but this predates the patch. I think ill_email at least would have been a bit more consistent and easier to read. But too late. ;)
Comment 6 Pedro Amorim 2024-10-21 11:35:19 UTC
Created attachment 173042 [details] [review]
Bug 37850: (QA follow-up): Update illemail REST API attribute name

To test
1) yarn api:bundle && koha-plack --restart kohadev
2) Enable ILLModule and put some 'ILL staff email:' on some library
3) Access <staff_url>/api/v1/libraries
4) Notice the attribute reads ill_email
Comment 7 Pedro Amorim 2024-10-21 11:35:52 UTC
(In reply to Katrin Fischer from comment #5)
> I am not a big fan of illemail as the name for the API, but this predates
> the patch. I think ill_email at least would have been a bit more consistent
> and easier to read. But too late. ;)

I agree. Patch is added if you decide to push.
Comment 8 Katrin Fischer 2024-10-21 11:49:01 UTC
(In reply to Pedro Amorim from comment #7)
> (In reply to Katrin Fischer from comment #5)
> > I am not a big fan of illemail as the name for the API, but this predates
> > the patch. I think ill_email at least would have been a bit more consistent
> > and easier to read. But too late. ;)
> 
> I agree. Patch is added if you decide to push.

Do you think it's save to push/not used much yet? Thinking of compatibility.
Comment 9 Pedro Amorim 2024-10-21 12:16:02 UTC
(In reply to Katrin Fischer from comment #8)
> (In reply to Pedro Amorim from comment #7)
> > (In reply to Katrin Fischer from comment #5)
> > > I am not a big fan of illemail as the name for the API, but this predates
> > > the patch. I think ill_email at least would have been a bit more consistent
> > > and easier to read. But too late. ;)
> > 
> > I agree. Patch is added if you decide to push.
> 
> Do you think it's save to push/not used much yet? Thinking of compatibility.

Given that this was pushed to main 2 hours ago, I'd be very surprised if anyone is using this (we are, but we're aware of this last moment change).
Comment 10 Katrin Fischer 2024-10-21 12:19:44 UTC
(In reply to Pedro Amorim from comment #9)
> (In reply to Katrin Fischer from comment #8)
> > (In reply to Pedro Amorim from comment #7)
> > > (In reply to Katrin Fischer from comment #5)
> > > > I am not a big fan of illemail as the name for the API, but this predates
> > > > the patch. I think ill_email at least would have been a bit more consistent
> > > > and easier to read. But too late. ;)
> > > 
> > > I agree. Patch is added if you decide to push.
> > 
> > Do you think it's save to push/not used much yet? Thinking of compatibility.
> 
> Given that this was pushed to main 2 hours ago, I'd be very surprised if
> anyone is using this (we are, but we're aware of this last moment change).

I was thinking of the non-public route for libraries.
Comment 11 Martin Renvoize (ashimema) 2024-11-12 13:16:54 UTC
Please push the follow-up.. we've gone from a 2 hour turn around on a patch to a 3 week delay!.. whilst there was zero chance of code being in production at time of writing, there's not a still low but not zero chance given the code has now been published for weeks not hours.  Still not released however so should certainly not be held up any longer.
Comment 12 Katrin Fischer 2024-11-12 13:30:11 UTC
(In reply to Martin Renvoize (ashimema) from comment #11)
> Please push the follow-up.. we've gone from a 2 hour turn around on a patch
> to a 3 week delay!.. whilst there was zero chance of code being in
> production at time of writing, there's not a still low but not zero chance
> given the code has now been published for weeks not hours.  Still not
> released however so should certainly not be held up any longer.

ill_email on the non-public route is already released, so there is a change we are using it. I am not sure if it's used internally or not, I can try and test.
Comment 13 Katrin Fischer 2024-11-12 16:03:22 UTC
I didn't spot any occurences. Picked follow-up for main.
Comment 14 Katrin Fischer 2024-11-12 16:55:33 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 15 Lucas Gass (lukeg) 2024-12-05 21:22:59 UTC
Enhancement, no 24.05.x backport.