StevenWeathers / thunderdome-planning-poker

⚡ Thunderdome is an open source agile planning poker, sprint retro, and story mapping tool
https://thunderdome.dev
Apache License 2.0
419 stars 109 forks source link

[Bug]: Can not vote "1/2" and "100" #609

Closed andreipop8x8 closed 1 month ago

andreipop8x8 commented 1 month ago

Contact Details

No response

What happened?

If trying to vote "1/2" or "100", the vote will not be saved. We get the following error in logs:

{"level":"error","ts":1725978360.8389022,"caller":"poker/story.go:125","msg":"CALL thunderdome.poker_user_vote_set error","version":"4.8.0","error":"ERROR: value too long for type character varying(3) (SQLSTATE 22001)","stacktrace":"github.com/StevenWeathers/thunderdome-planning-poker/internal/db/poker.(Service).SetVote\n\t/home/runner/work/thunderdome-planning-poker/thunderdome-planning-poker/internal/db/poker/story.go:125\ngithub.com/StevenWeathers/thunderdome-planning-poker/internal/http/poker.(Service).UserVote\n\t/home/runner/work/thunderdome-planning-poker/thunderdome-planning-poker/internal/http/poker/events.go:30\ngithub.com/StevenWeathers/thunderdome-planning-poker/internal/http/poker.subscription.readPump\n\t/home/runner/work/thunderdome-planning-poker/thunderdome-planning-poker/internal/http/poker/client.go:120"}

Self Hosted?

Yes

Version

4.8.0

What browsers are you seeing the problem on?

Chrome

Relevant log output

{"level":"error","ts":1725978360.8389022,"caller":"poker/story.go:125","msg":"CALL thunderdome.poker_user_vote_set error","version":"4.8.0","error":"ERROR: value too long for type character varying(3) (SQLSTATE 22001)","stacktrace":"github.com/StevenWeathers/thunderdome-planning-poker/internal/db/poker.(*Service).SetVote\n\t/home/runner/work/thunderdome-planning-poker/thunderdome-planning-poker/internal/db/poker/story.go:125\ngithub.com/StevenWeathers/thunderdome-planning-poker/internal/http/poker.(*Service).UserVote\n\t/home/runner/work/thunderdome-planning-poker/thunderdome-planning-poker/internal/http/poker/events.go:30\ngithub.com/StevenWeathers/thunderdome-planning-poker/internal/http/poker.subscription.readPump\n\t/home/runner/work/thunderdome-planning-poker/thunderdome-planning-poker/internal/http/poker/client.go:120"}

Code of Conduct

StevenWeathers commented 1 month ago

I'm updating that limit from 3 to 8 in this upcoming release tonight, I think your db has a different character set because 100 is definitely 3 characters.

StevenWeathers commented 1 month ago

v4.9.0 released with the update from 3 to 8 character limit, please update and try again.

andreipop8x8 commented 1 month ago

Hello, thank you so much ! Have tested with v4.9.1 - it works as excepted.

I have also verified our DB. It is all UTF8: encoding: UTF8, collate: en_US.UTF-8, Ctype: en_US.UTF-8