Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace is removed from fields, preventing the creation of new records when the field format requires spaces #4375

Open
grantfitzsimmons opened this issue Jan 9, 2024 · 2 comments
Labels
1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system

Comments

@grantfitzsimmons
Copy link
Contributor

grantfitzsimmons commented Jan 9, 2024

Hi.

We’ve run into a problem with the formatting of our Loan numbers in Specify 7 (v7.8.13).

Our loan number consists of three parts: the year the loan was prepared; a four digit number separated from the year by a forward slash; and the herbarium acronym of the borrowing institution, separated from the four digit number by a space.

For example: '2023/0021 NY ’ is the loan number for the 21st loan we prepared in 2023, which was sent to the herbarium at the New York Botanical Garden (NY). The acronym field is 6 characters, so when the acronym has fewer characters we add enough spaces after the acronym to make it 6 characters long.

The problem we have is that Specify 7 doesn’t seem to accept a loan number that ends in a space, meaning that we are unable to edit and save our Loan records in Specify 7. We are using Specify 6 also, so we are able to edit our Loans in 6, but perhaps future versions of Specify 7 could be made to allow Loan numbers to end in a space? Thanks!

It seems that the whitespace-trimming feature in Specify 7 is causing issues in this case. Apologies for the inconvenience.

Just to recap– in Specify 6, entering 2023/0021 NY would retain the space, matching the field format configured in your collection.

However, in Specify 7, entering 2023/0021 NY results in the space being removed. This interpretation as 2023/0021 NY prevents the record from being saved.

There is no perfect solution at this time. It seems the original data entry behavior existed as a workaround due to Specify requiring a fixed amount of characters for a field's format. This is something that we'll need to account for when expanding and improving the field format system in the future.

Reported By: Nimal on the Speciforum at Royal Botanic Gardens Victoria

@grantfitzsimmons grantfitzsimmons added 1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system labels Jan 9, 2024
@specifysoftware
Copy link

This issue has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/loan-number-format-in-specify-7/1455/2

@specifysoftware
Copy link

This issue has been mentioned on Specify Community Forum. There might be relevant details there:

https://discourse.specifysoftware.org/t/loan-number-format-in-specify-7/1455/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Forms Issues that are related to the form system
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants