Commit Graph

210 Commits

Author SHA1 Message Date
GitLab Bot 8f4d63426a Add latest changes from gitlab-org/gitlab@master 2021-05-05 18:10:31 +00:00
GitLab Bot 42d13aebd3 Add latest changes from gitlab-org/gitlab@master 2021-04-28 15:09:35 +00:00
GitLab Bot 383ec6808b Add latest changes from gitlab-org/gitlab@master 2021-04-08 18:09:32 +00:00
GitLab Bot 3bd9ad5574 Add latest changes from gitlab-org/gitlab@master 2021-03-25 03:09:35 +00:00
GitLab Bot 889bf7a0ee Add latest changes from gitlab-org/gitlab@master 2021-03-16 18:11:53 +00:00
GitLab Bot b08b3719a1 Add latest changes from gitlab-org/gitlab@master 2021-03-08 21:09:45 +00:00
GitLab Bot b5944525b0 Add latest changes from gitlab-org/gitlab@master 2021-02-09 21:09:19 +00:00
GitLab Bot aa874f4242 Add latest changes from gitlab-org/gitlab@master 2020-11-20 12:09:35 +00:00
GitLab Bot 74d35955aa Add latest changes from gitlab-org/gitlab@master 2020-11-06 03:09:19 +00:00
GitLab Bot ce27ba9f6c Add latest changes from gitlab-org/gitlab@master 2020-10-29 18:09:11 +00:00
GitLab Bot a683d38a36 Add latest changes from gitlab-org/gitlab@master 2020-10-26 18:08:27 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot c9ca178ba4 Add latest changes from gitlab-org/gitlab@master 2020-10-14 12:08:58 +00:00
GitLab Bot 11a29f1f02 Add latest changes from gitlab-org/gitlab@master 2020-08-25 15:10:17 +00:00
GitLab Bot 0bfb62457b Add latest changes from gitlab-org/gitlab@master 2020-08-19 06:10:04 +00:00
Robert Speicher 5982b74e32
Add latest changes from gitlab-org/gitlab@master 2020-08-12 13:31:49 -05:00
GitLab Bot ff1701e51d Add latest changes from gitlab-org/gitlab@master 2020-07-10 06:09:23 +00:00
GitLab Bot 340f15b402 Add latest changes from gitlab-org/gitlab@master 2020-06-30 15:08:48 +00:00
GitLab Bot 777f6da99a Add latest changes from gitlab-org/gitlab@master 2020-06-29 21:09:07 +00:00
GitLab Bot 4d5ee2b814 Add latest changes from gitlab-org/gitlab@master 2020-05-27 15:08:11 +00:00
GitLab Bot 1902e25626 Add latest changes from gitlab-org/gitlab@master 2020-05-20 21:09:09 +00:00
GitLab Bot 95e18e3283 Add latest changes from gitlab-org/gitlab@master 2020-04-28 18:09:35 +00:00
GitLab Bot 2e4d8b3449 Add latest changes from gitlab-org/gitlab@master 2020-04-28 03:09:53 +00:00
GitLab Bot f569792df8 Add latest changes from gitlab-org/gitlab@master 2020-04-27 18:09:41 +00:00
GitLab Bot 0d83264a7a Add latest changes from gitlab-org/gitlab@master 2020-04-15 15:09:17 +00:00
GitLab Bot 684d65316a Add latest changes from gitlab-org/gitlab@master 2020-04-02 12:08:18 +00:00
GitLab Bot b98fa9ef3d Add latest changes from gitlab-org/gitlab@master 2020-02-25 09:09:10 +00:00
GitLab Bot b042382bbf Add latest changes from gitlab-org/gitlab@master 2020-02-05 18:09:06 +00:00
GitLab Bot 85e494935a Add latest changes from gitlab-org/gitlab@master 2020-01-14 15:07:55 +00:00
GitLab Bot b0bfadd486 Add latest changes from gitlab-org/gitlab@master 2019-12-30 12:09:15 +00:00
GitLab Bot fb73ca3398 Add latest changes from gitlab-org/gitlab@master 2019-12-27 15:08:16 +00:00
GitLab Bot 1bab0ba591 Add latest changes from gitlab-org/gitlab@master 2019-10-01 09:10:39 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
GitLab Bot bd860c22f6 Add latest changes from gitlab-org/gitlab@master 2019-09-17 12:06:48 +00:00
Stan Hu 440635015f Fix N+1 Gitaly calls in /api/v4/projects/:id/issues
This is a follow-up from
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31938.

In GitLab 9.0,
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661 removed the
`subscribed` flag from the API when the user requested a list of issues
or merge requests since calculating this value triggers extensive
Markdown processing.

In GitLab 12.0 via a4fbf39e, we accidentally reintroduced this
performance regression by changing `IssueBasic` to `Issue` in
`entities.rb`. This showed up as a Gitaly N+1 issue since the Markdown
processing would attempt to extract a commit if it detected a regex that
matched a commit.

We restore the prior behavior by once again removing the `subscribed`
flag for the bulk list of issues and merge requests and add a test to
ensure they aren't reintroduced.

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/66202
2019-08-23 21:26:50 -07:00
Alexandru Croitor f5b855546e Update sort options for issues list
Increase sort options for issues list from updated_at and create_at,
to include more options close to what is required in actual issue list
UI.

This helps us to use REST API for issues list with sorting capabilities

https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
2019-08-23 11:32:15 +03:00
Stan Hu ba7c501fef Fix Gitaly N+1 calls with listing issues/MRs via API
In GitLab 9.0,
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9661 removed the
`subscribed` flag from the API when the user requested a list of issues
or merge requests since calculating this value triggers extensive
Markdown processing.

In GitLab 12.0 via a4fbf39e, we accidentally reintroduced this
performance regression by changing `IssueBasic` to `Issue` in
`entities.rb`. This showed up as a Gitaly N+1 issue since the Markdown
processing would attempt to extract a commit if it detected a regex that
matched a commit.

We restore the prior behavior by once again removing the `subscribed`
flag for the bulk list of issues and merge requests and add a test to
ensure they aren't reintroduced.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66202
2019-08-17 20:35:37 -07:00
Alexandru Croitor 09163e423a Expose merge requests count based on user access
Count issues related merge requests based on user access level. And
issue can have related MRs from projects where user does not have
access so the number of related merge requests should be adjusted
based on user's ability to access the related MRs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/59581
2019-06-18 12:46:46 +03:00
Jan Provaznik a17a15562d API issues - minor cleanup of permission check
Adds `set_issue_updated_at` similar to `set_issue_created_at`
permission and cleans up the related permission check in issues
API.
2019-06-11 23:12:21 +00:00
Imre Farkas 80832062ff CE port of Move EE specific lines in API::Issues 2019-05-29 10:28:11 +00:00
Alexandru Croitor 9ff6edf690 Review updates and cleanup
* Cleaned issues and issues_statistics docs
* Renamed param with_labels_data to with_labels_details
* Added spec for N+1 check when retrieving labels from issue
* Refactoed CheckAssigneesCount validation class
2019-05-17 13:56:25 +03:00
Alexandru Croitor f117c032ac Add params validations and remove extra params support
Remove label_name and milestone_title params support
Add mutually_exclusive validation for author_id and author_username
Add mutually_exclusive validation for assignee_id and assignee_username
Add validation to allow single value for asignee_username on CE
Add separate issue_stats_params helper for statistics params and
reuse in issues_params.
2019-05-15 10:15:17 +03:00
Alexandru Croitor a4fbf39eca Move issue details to from IssueBasic to Issue entity
Cleanup IssueBasic entity to keep it basic and move extra attributes
to Issue entity which contains more details
2019-05-15 10:15:17 +03:00
Alexandru Croitor 5ec28dc387 Changes to issues api
When issues_controller endpoint was used for search, the parameters
passed to the controller were slightly different then the ones
passed to API. Because the searchbar UI is reused in different
places and builds the parameters passed to request in same way
we need to account for old parameter names.


Add issues_statistics api endpoints

Adds issue_statistics api endpoints for issue lists and returns
counts of issues for all, closed and opened states.


Expose more label attributes based on a param

When requesting issues list through API expose more attributes
for labels, like color, description if with_labels_data param is
being passed, avoiding this way to change response schema for users
that already use API.

https://gitlab.com/gitlab-org/gitlab-ce/issues/57402
2019-05-15 10:15:16 +03:00
Heinrich Lee Yu e0b6838a90 Set correct timestamps when creating past issues
Sets `system_note_timestamp` from `created_at`
2019-04-16 19:57:49 +08:00
Sean McGivern 4317a2a3a2 Fix `updated_at` doesn't apply to `state_event` updates of issues via API 2019-04-08 15:33:30 +00:00
Alexandru Croitor c56970e3f7 Remove duplicates from issue related merge requests
Remove duplicates returned by Issues#related_merge_requests API that
relies on ReferencedMergeRequestsService which returns 2 arrays one of
related MRs and one of related MRs that close the issue(i.e. a subset
of first one). We only need related MRs in this case so just pick the
first array.
2019-04-05 22:17:07 +03:00
Alexandru Croitor f4adb50ef2 Expose head pipeline in the related merge requests
Expose head pipeline for the MR in the api when requesting
related merge requests for an issue and show a detailed
status for the pipeline, which would include:
details_path, favicon, group, icon, label, text, tooltip.

https://gitlab.com/gitlab-org/gitlab-ce/issues/57662#note_152023412
2019-04-04 09:01:09 +00:00
Yorick Peterse 71046be7d5
Backport API::Issues parameters from EE
This backports the parameters that EE adds to API::Issues, and wraps
them in conditionals so they are only used in EE.
2019-03-26 14:18:29 +01:00
Sean McGivern 3781cbe0c3 Merge branch 'sh-optimize-todos-api' into 'master'
Significantly reduce N+1 queries in /api/v4/todos endpoint

Closes #40378

See merge request gitlab-org/gitlab-ce!25711
2019-03-07 10:29:04 +00:00