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

Issue 'due date' format checking / 500 ISE #3922

Closed
2 of 7 tasks
bugreport0 opened this issue May 8, 2018 · 4 comments · Fixed by #3930
Closed
2 of 7 tasks

Issue 'due date' format checking / 500 ISE #3922

bugreport0 opened this issue May 8, 2018 · 4 comments · Fixed by #3930
Labels
Milestone

Comments

@bugreport0
Copy link
Contributor

  • Gitea version (or commit ref): 1.1.0+1205-gbb801488
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The issue due date entry box is finicky:

  • entering '1234' gives a HTTP 500 error page instead of an 'invalid format' warning
  • entering '1234-01-01' makes parts of Gitea think a due date was entered, but others ignore it

Screenshots

due-date-500

due-date-unset

@daviian
Copy link
Member

daviian commented May 8, 2018

@bugreport0 It ought to be a date input field. ;-) But you're right, the input format should be checked.
It's also possible to input a date before 1970, despite an "modified date" - action is generated the due date don't get set.

@lunny lunny added the type/bug label May 9, 2018
@lunny lunny added this to the 1.5.0 milestone May 9, 2018
@kolaente
Copy link
Member

kolaente commented May 9, 2018

The error 500 is because the validation happens server side, therefore the functions returns an err which leads to having 500 returned.
Validation is currently done directly by Macaron,so I don't know if we could return a message telling the user what went wrong instead 🤔

@daviian
Copy link
Member

daviian commented May 9, 2018

@kolaente But a 500 suggest an internal server error and not a validation error (4xx status code)

@kolaente
Copy link
Member

kolaente commented May 9, 2018

I've submitted a pr for issue due dates prior to 1970 not being displayed on the issue page: #3930
The validation error will be resolved with #3890. The api returns proper errorcodes, after that it's just a small thing to display a message to the user.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants