Bug 37860

Summary: Holds awaiting pickup table should include the patron main contact method
Product: Koha Reporter: Brendan Lawlor <blawlor>
Component: Hold requestsAssignee: Brendan Lawlor <blawlor>
Status: Pushed to main --- QA Contact: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Severity: enhancement    
Priority: P5 - low CC: baptiste.wojtkowski, gmcharlt, kyle, lucas, oleonard, shi-yao.wang
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
This adds the main contact method recorded in the user's account to the table of holds awaiting pick-up.
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 37860: Add Main contact method to Holds awaiting pickup table
Bug 37860: Add Main contact method to Holds awaiting pickup table
Bug 37860: Add Main contact method to Holds awaiting pickup table
Bug 37860: Add Main contact method to Holds awaiting pickup table
Bug 37860: Add Main contact method to Holds awaiting pickup table
Bug 37860: Add Main contact method to Holds awaiting pickup table
Interface idea

Description Brendan Lawlor 2024-09-06 21:13:25 UTC
Our library staff would like to see the patron main contact method included in the Holds Awaiting so they can easily tell if they should call up the patron to pickup their holds.
Comment 1 Brendan Lawlor 2024-09-09 15:15:47 UTC
Created attachment 171207 [details] [review]
Bug 37860: Add Main contact method to Holds awaiting pickup table

This patch adds the main contact method to the patron column of the
Holds awaiting pickup table. The style is intended to match the
modal on the hold found modal.

To test:
1. Apply patch and run yarn build && restart_all
2. Place a hold for a patron and check in the item
3. Notice the modal displays the main contact method in a yellow box
4. Go to Circulation > Holds awaiting pickup
5. Notice the main contact method displays in the Patron column in the same style
Comment 2 Brendan Lawlor 2024-09-09 15:17:54 UTC
Not sure if this is the best way to do the CSS, but the concept is to make the styling match how main contact method is displayed in the hold found modal. See Bug 33398
Comment 3 Shi Yao Wang 2024-09-26 17:54:13 UTC
Created attachment 171998 [details] [review]
Bug 37860: Add Main contact method to Holds awaiting pickup table

This patch adds the main contact method to the patron column of the
Holds awaiting pickup table. The style is intended to match the
modal on the hold found modal.

To test:
1. Apply patch and run yarn build && restart_all
2. Place a hold for a patron and check in the item
3. Notice the modal displays the main contact method in a yellow box
4. Go to Circulation > Holds awaiting pickup
5. Notice the main contact method displays in the Patron column in the same style

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Comment 4 Shi Yao Wang 2024-09-26 17:56:54 UTC
Works, but it seems to display the name of the db column as is. E.g. Secondary email shows "emailpro" in step 3 and 5. Maybe we want to display the actual text?

Signed-off nonetheless
Comment 5 Kyle M Hall (khall) 2025-01-17 14:35:56 UTC
Couple easy to fix qa issues:
1) primary_contact_method sees be labeled as "Main contact method" in other templates. Can you update that?
2) The primary_contact_method output needs to be run through a an if/elseif or switch statement to it can be translatable. Here is the code from moremember.tt you could use:
[% SWITCH patron.primary_contact_method %]
    [% CASE 'phone' %]
        <span>Primary phone</span>
    [% CASE 'phonepro' %]
        <span>Secondary phone</span>
    [% CASE 'mobile' %]
        <span>Other phone</span>
    [% CASE 'email' %]
        <span>Primary email</span>
    [% CASE 'emailpro' %]
        <span>Secondary email</span>
    [% CASE 'fax' %]
        <span>Fax</span>
[% END %]
Comment 6 Brendan Lawlor 2025-01-21 18:24:37 UTC
Created attachment 176880 [details] [review]
Bug 37860: Add Main contact method to Holds awaiting pickup table

This patch adds the main contact method to the patron column of the
Holds awaiting pickup table. The style is intended to match the
modal on the hold found modal.

To test:
1. Apply patch and run yarn build && restart_all
2. Place a hold for a patron and check in the item
3. Notice the modal displays the main contact method in a yellow box
4. Go to Circulation > Holds awaiting pickup
5. Notice the main contact method displays in the Patron column in the same style

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Comment 7 Brendan Lawlor 2025-01-21 18:28:46 UTC
Thanks Kyle, I appreciate your help. I made those two changes. Adding the switch statement also addresses Shi Yao's commnet #4.
Comment 8 Baptiste Wojtkowski (bwoj) 2025-02-27 09:55:54 UTC
Looks fine to me.
Maybe you want to add a gray chip when there is no primary method, as it is for messaging preference ?
Comment 9 Brendan Lawlor 2025-03-25 18:13:34 UTC
Created attachment 179700 [details] [review]
Bug 37860: Add Main contact method to Holds awaiting pickup table

This patch adds the main contact method to the patron column of the
Holds awaiting pickup table. The style is intended to match the
modal on the hold found modal.

To test:
1. Apply patch and run yarn build && restart_all
2. Place a hold for a patron and check in the item
3. Notice the modal displays the main contact method in a yellow box
4. Go to Circulation > Holds awaiting pickup
5. Notice the main contact method displays in the Patron column in the same style

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Comment 10 Brendan Lawlor 2025-03-25 18:15:09 UTC
Thanks for looking Baptiste.

I added a grey chip to display Main contact method: None
Comment 11 Baptiste Wojtkowski (bwoj) 2025-03-26 08:06:30 UTC
Created attachment 179715 [details] [review]
Bug 37860: Add Main contact method to Holds awaiting pickup table

This patch adds the main contact method to the patron column of the
Holds awaiting pickup table. The style is intended to match the
modal on the hold found modal.

To test:
1. Apply patch and run yarn build && restart_all
2. Place a hold for a patron and check in the item
3. Notice the modal displays the main contact method in a yellow box
4. Go to Circulation > Holds awaiting pickup
5. Notice the main contact method displays in the Patron column in the same style

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 12 Baptiste Wojtkowski (bwoj) 2025-03-26 08:54:04 UTC
Created attachment 179716 [details] [review]
Bug 37860: Add Main contact method to Holds awaiting pickup table

This patch adds the main contact method to the patron column of the
Holds awaiting pickup table. The style is intended to match the
modal on the hold found modal.

To test:
1. Apply patch and run yarn build && restart_all
2. Place a hold for a patron and check in the item
3. Notice the modal displays the main contact method in a yellow box
4. Go to Circulation > Holds awaiting pickup
5. Notice the main contact method displays in the Patron column in the same style

Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>


Current status: Passed QA
Comment 13 Katrin Fischer 2025-04-22 06:42:17 UTC
Noting a small thing:

+                            [% CASE 'fax' %]
+                                <span>Fax</span>
+                            [% END %]
+                        </div>
+                    [% ELSE %]
+                        <div class="main_contact_method none">Main contact method: None</div>
+                    [% END %]

I am not sure if we need the None case here. It takes up a lot of space in the table and could also be deducted from the info now shown. We also lose the distinction between label and content as it's now both combined into a string - not sure if that means something for accessibility.

What do you think?
Comment 14 Baptiste Wojtkowski (bwoj) 2025-04-22 08:57:01 UTC
(In reply to Katrin Fischer from comment #13)
> Noting a small thing:
> 
> +                            [% CASE 'fax' %]
> +                                <span>Fax</span>
> +                            [% END %]
> +                        </div>
> +                    [% ELSE %]
> +                        <div class="main_contact_method none">Main contact
> method: None</div>
> +                    [% END %]
> 
> I am not sure if we need the None case here. It takes up a lot of space in
> the table and could also be deducted from the info now shown. We also lose
> the distinction between label and content as it's now both combined into a
> string - not sure if that means something for accessibility.
> 
> What do you think?

I asked the dev to proceed to the add, I might be wrong but since it is working so for messaging preferences, I would have copied it.
If it is still fresh in your mind, how would you deduce from information above ? I think it is important to have the information that nothing is filled, but if you say it can be easily deduced from before at one glance, it is fine for me :)
I don't see how it would change accessibility, but I have very few knowledge in that field.
Comment 15 Katrin Fischer 2025-04-22 10:13:05 UTC
Actually, you are right about the accessibility.

When I looked at this I thought we had something like:

<div><label>Main contact method: </label><span>method</span></div>

But we always have below for all cases, including the none case:

<div class="label main_contact_method">Main contact method: method</div>

So it always represents as one long string. You can't easily hide the "Main contact method", but you could with some JS trickery.

I think the "none" case is a bit cluttering as it always adds a lot of text. Same for "Main contact method:" being repeated over and over.  

Usually the cluttering get worse in German as words tend to be too long and not wrap nicely. To explain my background about changing like this :) 

I am setting back to PQA and adding Owen. Maybe he has a good idea, otherwise will push as is.
Comment 16 Owen Leonard 2025-04-22 11:47:29 UTC
Created attachment 181246 [details]
Interface idea

Is this too obscure?
Comment 17 Katrin Fischer 2025-04-22 12:10:14 UTC
(In reply to Owen Leonard from comment #16)
> Created attachment 181246 [details]
> Interface idea
> 
> Is this too obscure?

I like the basic idea, but do we display all the options from the main contact method to be able to put a star on them?
Comment 18 Katrin Fischer 2025-04-25 06:48:41 UTC
Pushed for 25.05!

Well done everyone, thank you!