GitLab FOSS merge requestshttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests2017-11-29T12:45:12Zhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13884Resolve "Customize branch name when using create branch in an issue"2017-11-29T12:45:12Zusername-removed-86853blackst0ne.ru@gmail.comResolve "Customize branch name when using create branch in an issue"## What does this MR do?
This MR adds an ability to type a custom branch name in the `Create merge request` dropdown placed in an issue.
## TODO
* [ ] Add backend specs
* [ ] Add frontend specs
## Are there points in the code th...## What does this MR do?
This MR adds an ability to type a custom branch name in the `Create merge request` dropdown placed in an issue.
## TODO
* [ ] Add backend specs
* [ ] Add frontend specs
## Are there points in the code the reviewer needs to double check?
![create_mr_button](/uploads/8f5e06e455a85500973334797c563ede/create_mr_button.gif)
## Why was this MR needed?
It improves UX of branch management.
## Screenshots (if relevant)
To be added.
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #2114310.1username-removed-86853blackst0ne.ru@gmail.comusername-removed-86853blackst0ne.ru@gmail.comhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13859Link to project labels page2017-09-10T20:26:49Zusername-removed-911300Link to project labels page## What does this MR do?
Fixes the issue - https://gitlab.com/gitlab-org/gitlab-ce/issues/23472
## Are there points in the code the reviewer needs to double check?
Please check the screenshot to ensure that this satisfies UX criteria
#...## What does this MR do?
Fixes the issue - https://gitlab.com/gitlab-org/gitlab-ce/issues/23472
## Are there points in the code the reviewer needs to double check?
Please check the screenshot to ensure that this satisfies UX criteria
## Why was this MR needed?
https://gitlab.com/gitlab-org/gitlab-ce/issues/23472
## Screenshots (if relevant)
![Screen_Shot_2017-08-28_at_12.11.39_AM](/uploads/c42dd46b2b8541d8fb488a5653d8860d/Screen_Shot_2017-08-28_at_12.11.39_AM.png)
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
23472username-removed-911300username-removed-911300https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13753Filter issues / merge request fuzzy search those comments2017-09-29T18:31:43Zusername-removed-7736Filter issues / merge request fuzzy search those comments## What does this MR do?
Filter issues / merge requests fuzzy search those comments.
## Are there points in the code the reviewer needs to double check?
- SQL performance
### Test data
<details>
<summary>Data</summary>
<...## What does this MR do?
Filter issues / merge requests fuzzy search those comments.
## Are there points in the code the reviewer needs to double check?
- SQL performance
### Test data
<details>
<summary>Data</summary>
<pre>
gitlabhq_development=# SELECT COUNT(*) FROM issues;
count
-------
12333
gitlabhq_development=# SELECT COUNT(*) FROM notes;
count
-------
999
</pre>
</details>
### Query without project
The following is `EXPLAIN ANALYSE` output made by `Issue.full_search_with_comments("foo bar")`
<details>
<summary>Query</summary>
<pre>
EXPLAIN ANALYZE SELECT "issues".*
FROM "issues"
WHERE "issues"."deleted_at" IS NULL
AND (issues.id IN
(SELECT "issues"."id"
FROM "issues"
WHERE "issues"."deleted_at" IS NULL
AND ("issues"."title" ILIKE '%foo%'
AND "issues"."title" ILIKE '%bar%'
OR "issues"."description" ILIKE '%foo%'
AND "issues"."description" ILIKE '%bar%')
UNION SELECT "notes"."noteable_id"
FROM "notes"
WHERE "notes"."noteable_type" = 'Issue'
AND ("notes"."note" ILIKE '%foo%'
AND "notes"."note" ILIKE '%bar%')))
ORDER BY "issues"."id" DESC;
</pre>
</details>
<details>
<summary>Query plan</summary>
<pre>
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=108.73..108.74 rows=2 width=347) (actual time=0.105..0.105 rows=0 loops=1)
Sort Key: issues.id DESC
Sort Method: quicksort Memory: 25kB
-> Nested Loop (cost=92.35..108.72 rows=2 width=347) (actual time=0.097..0.097 rows=0 loops=1)
-> Unique (cost=92.07..92.08 rows=2 width=4) (actual time=0.097..0.097 rows=0 loops=1)
-> Sort (cost=92.07..92.07 rows=2 width=4) (actual time=0.097..0.097 rows=0 loops=1)
Sort Key: issues_1.id
Sort Method: quicksort Memory: 25kB
-> Append (cost=48.00..92.06 rows=2 width=4) (actual time=0.089..0.089 rows=0 loops=1)
-> Bitmap Heap Scan on issues issues_1 (cost=48.00..52.02 rows=1 width=4) (actual time=0.040..0.040 rows=0 loops=1)
Recheck Cond: ((((title)::text ~~* '%foo%'::text) AND ((title)::text ~~* '%bar%'::text)) OR ((description ~~* '%foo%'::text) AND (description ~~* '%bar%'::text)))
Filter: (deleted_at IS NULL)
-> BitmapOr (cost=48.00..48.00 rows=1 width=0) (actual time=0.039..0.039 rows=0 loops=1)
-> Bitmap Index Scan on index_issues_on_title_trigram (cost=0.00..24.00 rows=1 width=0) (actual time=0.022..0.022 rows=0 loops=1)
Index Cond: (((title)::text ~~* '%foo%'::text) AND ((title)::text ~~* '%bar%'::text))
-> Bitmap Index Scan on index_issues_on_description_trigram (cost=0.00..24.00 rows=1 width=0) (actual time=0.014..0.014 rows=0 loops=1)
Index Cond: ((description ~~* '%foo%'::text) AND (description ~~* '%bar%'::text))
-> Bitmap Heap Scan on notes (cost=36.00..40.02 rows=1 width=4) (actual time=0.049..0.049 rows=0 loops=1)
Recheck Cond: ((note ~~* '%foo%'::text) AND (note ~~* '%bar%'::text))
Filter: ((noteable_type)::text = 'Issue'::text)
Rows Removed by Filter: 1
Heap Blocks: exact=1
-> Bitmap Index Scan on index_notes_on_note_trigram (cost=0.00..36.00 rows=1 width=0) (actual time=0.034..0.034 rows=1 loops=1)
Index Cond: ((note ~~* '%foo%'::text) AND (note ~~* '%bar%'::text))
-> Index Scan using issues_pkey on issues (cost=0.29..8.30 rows=1 width=347) (never executed)
Index Cond: (id = issues_1.id)
Filter: (deleted_at IS NULL)
Planning time: 1.222 ms
Execution time: 0.480 ms
</pre>
</details>
### Query with project
The following is `EXPLAIN ANALYSE` output made by `IssuesFinder.new(user, params).execute`
```
=> #<IssuesFinder:0x007f9a9ea0c248
@current_user=#<User id:1 @root>,
@params={"project_id"=>1, "search"=>"foo bar"}>
```
<details>
<summary>Query</summary>
<pre>
SELECT "issues".* FROM "issues" WHERE "issues"."deleted_at" IS NULL AND (issues.id IN (SELECT "issues"."id" FROM "issues" WHERE "issues"."deleted_at" IS NULL AND ("issues"."title" ILIKE '%foo%' AND "issues"."title" ILIKE '%bar%' OR "issues"."description" ILIKE '%foo%' AND "issues"."description" ILIKE '%bar%')
UNION
SELECT "notes"."noteable_id" FROM "notes" WHERE "notes"."noteable_type" = 'Issue' AND ("notes"."note" ILIKE '%foo%' AND "notes"."note" ILIKE '%bar%'))) AND "issues"."project_id" = 1 ORDER BY "issues"."id" DESC
</pre>
</details>
<details>
<summary>Query plan</summary>
<pre>
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=120.74..120.74 rows=1 width=347) (actual time=0.204..0.205 rows=4 loops=1)
Sort Key: issues.id DESC
Sort Method: quicksort Memory: 26kB
-> Nested Loop (cost=104.35..120.73 rows=1 width=347) (actual time=0.169..0.186 rows=4 loops=1)
-> Unique (cost=104.07..104.08 rows=2 width=4) (actual time=0.156..0.158 rows=4 loops=1)
-> Sort (cost=104.07..104.07 rows=2 width=4) (actual time=0.155..0.155 rows=4 loops=1)
Sort Key: issues_1.id
Sort Method: quicksort Memory: 25kB
-> Append (cost=52.00..104.06 rows=2 width=4) (actual time=0.075..0.142 rows=4 loops=1)
-> Bitmap Heap Scan on issues issues_1 (cost=52.00..56.02 rows=1 width=4) (actual time=0.075..0.083 rows=4 loops=1)
Recheck Cond: ((((title)::text ~~* '%foo%'::text) AND ((title)::text ~~* '%bar%'::text)) OR ((description ~~* '%foo%'::text) AND (description ~~* '%bar%'::text)))
Filter: (deleted_at IS NULL)
Heap Blocks: exact=2
-> BitmapOr (cost=52.00..52.00 rows=1 width=0) (actual time=0.059..0.059 rows=0 loops=1)
-> Bitmap Index Scan on index_issues_on_title_trigram (cost=0.00..28.00 rows=1 width=0) (actual time=0.045..0.045 rows=4 loops=1)
Index Cond: (((title)::text ~~* '%foo%'::text) AND ((title)::text ~~* '%bar%'::text))
-> Bitmap Index Scan on index_issues_on_description_trigram (cost=0.00..24.00 rows=1 width=0) (actual time=0.014..0.014 rows=0 loops=1)
Index Cond: ((description ~~* '%foo%'::text) AND (description ~~* '%bar%'::text))
-> Bitmap Heap Scan on notes (cost=44.00..48.02 rows=1 width=4) (actual time=0.058..0.058 rows=0 loops=1)
Recheck Cond: ((note ~~* '%foo%'::text) AND (note ~~* '%bar%'::text))
Filter: ((noteable_type)::text = 'Issue'::text)
Rows Removed by Filter: 1
Heap Blocks: exact=1
-> Bitmap Index Scan on index_notes_on_note_trigram (cost=0.00..44.00 rows=1 width=0) (actual time=0.044..0.044 rows=1 loops=1)
Index Cond: ((note ~~* '%foo%'::text) AND (note ~~* '%bar%'::text))
-> Index Scan using issues_pkey on issues (cost=0.29..8.30 rows=1 width=347) (actual time=0.004..0.004 rows=1 loops=4)
Index Cond: (id = issues_1.id)
Filter: ((deleted_at IS NULL) AND (project_id = 1))
Planning time: 1.816 ms
Execution time: 0.330 ms
</pre>
</details>
## Why was this MR needed?
Currently those searches the issue title and description, but not comments.
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #20872, #2201
username-removed-7736username-removed-7736https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13686Autocomplete group members in group issues search author and assignee filters2017-08-24T04:27:27Zusername-removed-7736Autocomplete group members in group issues search author and assignee filters## What does this MR do?
Display group and nested group and project members in the group issues search author and assignee filters
## Are there points in the code the reviewer needs to double check?
- SQL performance
## Why w...## What does this MR do?
Display group and nested group and project members in the group issues search author and assignee filters
## Are there points in the code the reviewer needs to double check?
- SQL performance
## Why was this MR needed?
All users are displayed in the group issues search author and assignee filters.
It is inconvenient.
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #36702https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/11899Fix #20930: automatic closing is not triggered on very first push.2017-10-25T00:06:02Zusername-removed-623229Fix #20930: automatic closing is not triggered on very first push.## What does this MR do?
Notice users about the fact that automatic issue closing is disabled on very first push for performance reasons (see #20930).
Fix #20930## What does this MR do?
Notice users about the fact that automatic issue closing is disabled on very first push for performance reasons (see #20930).
Fix #20930username-removed-623229username-removed-623229https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/9538Add shortcuts to go to specific issue or merge request directly2019-09-20T00:37:40Zusername-removed-723067Add shortcuts to go to specific issue or merge request directly## What does this MR do?
Introduces two new keyboard shortcuts:
- <kbd>#</kbd>: opens a modal dialog which prompts the user to input the issue id, and redirects the browser to the according location afterwards.
- <kbd>!</kbd>: same ...## What does this MR do?
Introduces two new keyboard shortcuts:
- <kbd>#</kbd>: opens a modal dialog which prompts the user to input the issue id, and redirects the browser to the according location afterwards.
- <kbd>!</kbd>: same for merge requests
The modal uses a form to trigger the form submission event when pressing ENTER while in the input field, so the user does not have to click on the `OK` button. When dismissing the modal (by pressing <kbd>ESC</kbd> or clicking the close button), no action is taken.
Filters user input to dismiss everything but digits. If an emtpy string is submitted or all characters are filtered out, no action is taken.
## Are there points in the code the reviewer needs to double check?
Fixes one test expectation in `spec/features/projects/shortcuts_spec.rb` to actually check that the <kbd>i</kbd> shortcut redirects to the new issue path. This shortcut is not part of this MR, but I had problems (see #28307) when running the spec file without this change; I suppose that in the previous version the expectation was instantly fulfilled, as Capybara finds the project's name somewhere on the page, so the test database teardown was started while FactoryGirl was still in the process of creating records.
## Why was this MR needed?
The shortcuts <kbd>g i</kbd> (go to issue list) resp. <kbd>g m</kbd> (go to merge request list) are fine, but sometimes you know which issue or merge request you need, and you need them fast (image your project manager standing behind you).
With this MR, you can open the needed entity only with keyboard shortcut by quickly typing <kbd># 1234 ENTER</kbd>.
## Screenshots (if relevant)
Please see the following .webm file. First the shortcut `#` is used to go to issue no. 4, then the shortcut `!` is used to go to merge request 1. You can also see the modal dialog in the video.
![gitlab-proposal-add-shortcuts.webm](https://gitlab.com/gitlab-org/gitlab-ce/uploads/90b7db5b8fa6c4edaa27c26cb9e98a40/gitlab-proposal-add-shortcuts.webm)
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #28737username-removed-723067username-removed-723067https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/8494WIP: Group MR numbers on issue show page by project and namespace2018-06-21T01:27:58Zusername-removed-235897WIP: Group MR numbers on issue show page by project and namespace## What does this MR do?
Groups MRs on the issue show page into those for the current project, those for projects in the namespace, and projects outside of the namespace. This makes the ordering consistent with the work done on #7110.
...## What does this MR do?
Groups MRs on the issue show page into those for the current project, those for projects in the namespace, and projects outside of the namespace. This makes the ordering consistent with the work done on #7110.
## Are there points in the code the reviewer needs to double check?
None that I can think of. Maybe if anything, a visual separator between different projects?
## Why was this MR needed?
Consistency with other ordering.
## Screenshots (if relevant)
Old:
![Screen_Shot_2017-01-08_at_4.56.14_PM](/uploads/a0ac6f78ce9ee300aefa4cbef4b57529/Screen_Shot_2017-01-08_at_4.56.14_PM.png)
New:
![Screen_Shot_2017-01-08_at_4.52.12_PM](/uploads/58f90aaff123576a4671f32bb01f5647/Screen_Shot_2017-01-08_at_4.52.12_PM.png)
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- N/A [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- N/A API support added
- Tests
- N/A Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #26466https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6652WIP: Show commit messages in issues2017-04-12T07:55:40Zusername-removed-60772WIP: Show commit messages in issues## What does this MR do?
Displays the full, rendered commit message below "Mentioned in commit af12af" system notes on the issue page.
## Are there points in the code the reviewer needs to double check?
The use of javascript is not id...## What does this MR do?
Displays the full, rendered commit message below "Mentioned in commit af12af" system notes on the issue page.
## Are there points in the code the reviewer needs to double check?
The use of javascript is not ideal, but it's an easy way to control when and where this extra content will show while loading the data through Banzai, which seems like a much simpler initial fix than restructuring other code, perhaps right back to `SystemNoteService.cross_reference`, to make this data available in the note itself.
This feature may need a project option or per-issue silence button because in some situations commit messages may be long or an issue may be mentioned in passing far too much. A text collapse control that limits the block initially visible to a few lines may also help with this, at the cost of making some information less visible again.
## Why was this MR needed?
The commit messages often have crucial information regarding the progress of work against an issue and other commentary of interest when reading an issue, and, although the commit titles are available in a tooltip, this information is not currently visible enough.
## Screenshots (if relevant)
![Screenshot_from_2016-10-03_13-23-42](/uploads/c038b25eb01cafb1026df58b85d73098/Screenshot_from_2016-10-03_13-23-42.png)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
#1784https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4218Make the branch creation button check simpler2017-04-05T11:41:01Zusername-removed-1164jeroenvanbaarsen@gmail.comMake the branch creation button check simpler## What does this MR do?
It changes the behaviour of the "Create new branch" button, so that it shows when there is a related branch, and just hides the complete button if the issue has been closed
## Why was this MR needed?
I was r...## What does this MR do?
It changes the behaviour of the "Create new branch" button, so that it shows when there is a related branch, and just hides the complete button if the issue has been closed
## Why was this MR needed?
I was responding to an issue that I closed earlier today, and then I saw that the button says: "New branch is unavailable". And my first assumption at that point was, that the button was broken. So the behaviour felt unexpected to me. By changing it around a little bit I've tried to make the behaviour more "logical"
## Are there points in the code the reviewer needs to double check?
@zj It would be great if you can take a look as well, since you are the original author of the code.
## Open todos
* [ ] Create tests (Will do after the first review pass is done, and I know this new behaviour has the change to be merged.)username-removed-1164jeroenvanbaarsen@gmail.comusername-removed-1164jeroenvanbaarsen@gmail.com