aboutsummaryrefslogtreecommitdiffstats
path: root/models/fixtures/milestone.yml
Commit message (Collapse)AuthorAgeFilesLines
* migrations: a deadline at January 1st, 1970 is valid (#18237)Aravinth Manivannan2022-01-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * migrations: a deadline at January 1st, 1970 is valid Do not change the deadline value if it is set to January 1st, 1970. Setting the deadline to year 9999 when it is zero (which is equal to January 1st, 1970) modifies a deadline set to January 1st, 1970 which is a valid date. In addition, setting a date in year 9999 will be converted to a null date in some cases. Signed-off-by: Loïc Dachary <loic@dachary.org> * tests: set milestone.deadline_unix in fixtures The value of deadline_unix must be set to 253370764800 (i.e. 9999-01-01) in fixtures, otherwise it will be inserted as null which leads to unexpected errors. For instance, DumpRepository will store a null deadline_unix as 0 (i.e. 1970-01-01) and RestoreRepository will change it to 9999-01-01. Signed-off-by: Loïc Dachary <loic@dachary.org> Co-authored-by: Loïc Dachary <loic@dachary.org> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* tests: add coverage for models migration helpers (#18162)Aravinth Manivannan2022-01-031-0/+5
| | | | | | | | They were previously not covered at all, either by integration tests or unit tests. This PR also fixes a bug where the `num_comments` field was incorrectly set to include all types of comments. It sets num_closed_issues: 0 as default in milestone unit test fixtures. If they are not set, Incr("num_closed_issues") will be a noop because the field is null.
* API: fix set milestone on PR creation (#14981)Norwin2021-03-131-0/+8
| | | | | | | | | | | | | | * API: fix set milestone on PR creation pr creation via API failed with 404, because we searched for milestoneID 0, due to uninitialized var usage D: * add tests * fix expected status codes * fix tests Co-authored-by: 6543 <6543@obermui.de>
* [API] ListIssues add filter for milestones (#10148)65432020-04-301-1/+1
| | | | | | | | | * Refactor Issue Filter Func * ListIssues add filter for milestones * as per @lafriks * documentation ...
* Fix #9189 - API Allow only specific Colums to be updated on Issue (#9539)65432020-01-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dont insert "-1" in any case to issue.poster_id * Make sure API cant override importand fields * code format * fix lint * WIP test * add missing poster_id * fix test * user.IsGhost handle nil * CI.restart() * make sure no -1 is realy added * CI.restart() * @lunny suggestion remove some not allowed fields * seperate issue.LoadMilestone * load milestone and return it on IssueEdit via API * extend Test for TestAPIEditIssue * fix fixtures * declare allowedColumnsUpdateIssueByAPI only once * Update Year * no var just write id drecty into func cal Co-authored-by: Lauris BH <lauris@nix.lv>
* Add state param to milestone listing API (#7131)Lanre Adelowo2019-06-061-0/+8
| | | | | | | | | | | | | | | | * Support state params * update tests * fix tests * add state=all support * update tests * update swagger * update swagger
* Unit tests for issue_milestone (#878)Ethan Koenig2017-02-091-0/+15