Bug 39882 - Add phone number masking option
Summary: Add phone number masking option
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-12 19:25 UTC by Lucas Gass (lukeg)
Modified: 2025-09-26 01:50 UTC (History)
3 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

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-05-12 19:25:30 UTC
It would be nice it we should add a mask for phone number fields. For certain things, like Twilio, it is important that a phone number gets set in an exact format. 

We have Maskito for date entry, we might be able to leverage that for phone numbers:

https://maskito.dev/recipes/phone
Comment 1 Danielle 2025-05-13 18:43:28 UTC
I like that idea too. Would this be something we could setup individually or a global system preference with a few options to choose from?
Comment 2 Brandon 2025-09-23 22:24:19 UTC
+1 for this feature. Phone number fields should not be plain text inputs. Just a recipe for bad data.
Comment 3 Lucas Gass (lukeg) 2025-09-25 13:21:33 UTC
(In reply to Brandon from comment #2)
> +1 for this feature. Phone number fields should not be plain text inputs.
> Just a recipe for bad data.

The correct way to do this is probably Bug 23817, normalize all phone numbers in patron search and DB.
Comment 4 David Cook 2025-09-26 01:48:28 UTC
(In reply to Lucas Gass (lukeg) from comment #3)
> (In reply to Brandon from comment #2)
> > +1 for this feature. Phone number fields should not be plain text inputs.
> > Just a recipe for bad data.
> 
> The correct way to do this is probably Bug 23817, normalize all phone
> numbers in patron search and DB.

Funny enough I was just talking last night about how I should resurrect this for main. I've been using it locally for the past 2 years and it's nice. 

That said, formatting phone numbers for display purposes at least could be cool.
Comment 5 David Cook 2025-09-26 01:50:17 UTC
(In reply to David Cook from comment #4)
> Funny enough I was just talking last night about how I should resurrect this
> for main. I've been using it locally for the past 2 years and it's nice. 

Let me know if you'd like me to post some updated patches. I could certainly make some time for that, if you're interested in it.