Inventory: Strip leading, trailing, and double spaces out of data in some elements (instance, holdings, item)

Description

Overview:
We’ve discovered that it’s very easy, when copying and pasting data into, for example, the call number field in a holdings record, to include one or more leading or trailing spaces. It’s also easy to delete unwanted characters and end up with multiple spaces where there should be just one. This is impacting spine labeling. This same issue could cause problems with barcode retrieval. We’d like the data to be stored without the extra spaces.

"space" should be considered as a category, not a literal character, e.g., leading and trailing carriage returns & tabs should also be ignored

 can provide additional details

Steps to Reproduce:

  1. Log into some FOLIO Snapshot as user Diku_admin

  2. Go to the Inventory app

  3. In another tab open OCLC Worldcat, and find ..

Expected Results:
Actual Results:
Additional Information:
Will most likely require re-index, to get the white space not being indexed
URL:
Interested parties:

Developer Notes

Before this can be worked on, we need more information.

Which record types should this apply to? Is it every record type in inventory?

  • Yes

Which fields should this apply to? Is it all text fields?

Which characters should be removed? Is it the spaces, tabs and carriage returns or all characters than unicode considered to be whitespace?

  • Spaces, tabs, and carriage returns

Priority

Fix versions

Development Team

Folijet

Assignee

Solution Architect

Parent Field Value

None

Parent Status

None

Checklist

hide

TestRail: Results

Activity

Show:

Felix HemmeJanuary 20, 2025 at 8:13 AM

Hi , long time not heard from this feature. I’ve added it to MM’s new Implementation Topics List and wanted to ask you if this is in scope for Trillium?

Raegan WiechertSeptember 14, 2023 at 4:07 PM

Not sure if this matters or not, but https://folio-org.atlassian.net/wiki/display/MM/2023-09-14+Metadata+Management+Meeting+notes could be added under the "Mentioned in" section above.

Thomas TruttAugust 9, 2023 at 4:55 PM

and I was hoping that we could get this feature re-evaluated and hopefully prioritized for development. The one prior block for this issue was barcode data that Duke had, in that their barcodes legitimately contained trailing spaces. Even though that was a fringe case it would have greatly impacted them and created a showstopper. Since Duke will not be moving to FOLIO at this time, we were hoping this feature could be looked at again and implemented. 

Autumn FaulknerAugust 9, 2023 at 2:55 PM

We are having spine labeling and scanning issues in Inventory due to leading spaces. These spaces get introduced sometimes by our label maker when we're interacting with some irregular barcodes we use at MSU. (It basically wants to add spaces for barcodes that don't have the full amount of expected characters.) While we are working on a solution to the label maker issue (which of course turns out to be more nasty than expected), this was not a problem in Sierra because Sierra ignores/normalizes spaces altogether.

Also, outside of Inventory, we find the spaces are not an issue. So we assume other Folio modules have this capability. Hoping this can be replicated in Inventory as well.

Marc JohnsonNovember 21, 2022 at 12:19 PM

Thank you for the follow up.

I'm fairly confident we could do the reprogramming, but if it didn't, either we would need that search to work or we would need some more meaningful error message than simply that the barcode wasn't found.

What kind of different error message would be wanted?

I'm asking because I'm unsure how we would differentiate once all of the spaces have been stripped from the data.

Details

Reporter

PO Rank

80

Front End Estimate

XL < 15 days

Front End Estimator

Front-End Confidence factor

20%

Back End Estimate

XL < 15 days

Back End Estimator

Back-End Confidence factor

20%

Release

Not Scheduled

Rank: Cornell (Full Sum 2021)

R2

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created August 19, 2021 at 7:52 PM
Updated March 27, 2025 at 2:43 PM
TestRail: Cases
TestRail: Runs