Skip to content

Comments

Bugfix: Add Trimspace to New Objects#6226

Merged
WithoutPants merged 4 commits intostashapp:developfrom
Gykes:Add-Trimspace-to-Backend
Nov 26, 2025
Merged

Bugfix: Add Trimspace to New Objects#6226
WithoutPants merged 4 commits intostashapp:developfrom
Gykes:Add-Trimspace-to-Backend

Conversation

@Gykes
Copy link
Collaborator

@Gykes Gykes commented Nov 2, 2025

This will add trimspace on all major object additions, Studios, Scenes, Performers, Tags and Galleries.

Before, users were able to add white space on either end of a string and this will remove that ability going forward.

Old:
Performer 1 name: ABC = ABC
Performer 2 name: ABC = ABC

New:
Performer 1 name: ABC = ABC
Performer 2 name ABC = Error due to name already existing

Objects that are allowed to have non unique names will continue to function as normal. Objects that do not allow non unique names (performers) will error out.

I'm not 100% sure what this will do to currently running versions that use this bug/feature to sort.

Fixes: #789
Fixes: #3262

@Gykes Gykes force-pushed the Add-Trimspace-to-Backend branch from 8c14dfb to a4e4b0d Compare November 2, 2025 00:22
@WithoutPants WithoutPants added this to the Version 0.30.0 milestone Nov 6, 2025
@WithoutPants WithoutPants added the improvement Something needed tweaking. label Nov 6, 2025
@feederbox826
Copy link
Collaborator

I'm not 100% sure what this will do to currently running versions that use this bug/feature to sort.

just make sure it's not enabled on the "sort name" field

@WithoutPants
Copy link
Collaborator

Missing changes in resolver_mutation_gallery.go, resolver_mutation_movie.go, resolver_mutation_saved_filter.go.

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 26, 2025

Updated those pages. Do we want to extend the support to other things such as Details and code?

@discourse-stashapp
Copy link

This pull request has been mentioned on Stash. There might be relevant details there:

https://discourse.stashapp.cc/t/stash-v0-30-release-development-thread/4484/1

@WithoutPants
Copy link
Collaborator

Updated those pages. Do we want to extend the support to other things such as Details and code?

As far as I can tell, these are already covered by the translator.string calls.

@Gykes
Copy link
Collaborator Author

Gykes commented Nov 26, 2025

Yea, I thought as as well but didn't know if you wanted to move them all over to the slice or just leave them as.

Leave it as, got it.

@WithoutPants WithoutPants merged commit 0bd78f4 into stashapp:develop Nov 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Something needed tweaking.

Projects

None yet

4 participants