[FOLIO-2653] Remove leading and trailing whitespace from text properties Created: 22/Jun/20  Updated: 03/Feb/21  Resolved: 03/Feb/21

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: TBD
Reporter: Marc Johnson Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: potential-decision
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to UIU-1528 Trim email addresses in User records ... Closed
Sprint:

 Description   

Decision

Should FOLIO API's automatically remove leading or trailing whitespace from text properties?

Context

Split from UIU-1528 Closed . It was discovered that leading or trailing spaces in a user's email address caused e-mail notices not to be sent to that user.



 Comments   
Comment by Marc Johnson [ 22/Jun/20 ]

Zak Burke

I'm moving the general conversation about this here from [UII-1528].

People rail against MySQL for silently doing this kind of thing. Counterpoint: which statement do you think is more accurate: "leading and trailing spaces on most fields are deliberate" or "leading and trailing spaces on most fields are accidental"? That is, which statement do you think is most accurate most of the time?

I am biased against changes to data being made automatically. It relies on inferring the intent of a client, which can often be a fools errand.

It also increases the coupling between client and the server because the client needs to know this is being done automatically (e.g. in case it wanted to compare representations) and may come to believe it can rely on the server to always do this.

I think these kinds of automatic changes tend to be well intended and yet cause surprises. In some cases, I think those become challenging situations to address, as systems then need exceptions to these rules, which increases complexity.

Are you willing to consider that whitespace padding is likely accidental for certain types of data, e.g. email addresses and barcodes?

Sure, I'm more than willing to consider it and accept it being corrected automatically. I tend to want to throw some caution into the mix about decisions like this.

One of the early challenges that we might encounter could be how to classify the properties.

You're right that we don't have a project-wide policy about this, but I really don't think that stripping leading/trailing whitespace from an email address (or any field, personally) is likely to be controversial.

It probably isn't controversial.

Comment by Marc Johnson [ 03/Feb/21 ]

Closing as pre-dates the new decision making process and has not progressed

Generated at Thu Feb 08 23:22:15 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.