go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
43.84k stars 5.38k forks source link

Issue due dates not exported in gitea dump #8034

Open PerfectSlayer opened 4 years ago

PerfectSlayer commented 4 years ago

Description

When dumping a backup, the issue due dates in SQL dump are not valid. The problem is the field deadline_unix of the table issue. All the exported values equal -62135596800 if a due date is set, 0 otherwise.

0 is fine but negative value for a timestamp is wrong. Once reimported, the due date show is the 1st of January 1970.

Screenshots

image image

lafriks commented 4 years ago

@lunny Could this be upstream xorm issue?

lunny commented 4 years ago

I will take a look at this.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

yp05327 commented 5 months ago

Maybe we need a validate for deadline. https://github.com/go-gitea/gitea/blob/2f060c5834d81f0317c795fc281f9a07e03e5962/routers/web/repo/issue.go#L2303-L2309