diff options
author | Robert Speicher <robert@gitlab.com> | 2016-11-02 10:51:44 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-15 18:35:51 +0100 |
commit | 52c7286adc6b5c239c2062a57549c61d1d190a32 (patch) | |
tree | 7247ac2c8ff12bed481dcfb826918aa7154554eb | |
parent | b4db38889e5210c908ca7e951a31a9945fc61bcd (diff) | |
download | gitlab-ce-52c7286adc6b5c239c2062a57549c61d1d190a32.tar.gz |
Merge branch '23713-milestone-dropdown-not-selected' into 'master'
Milestone dropdown does not stay selected
Closes #23713
See merge request !7117
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | CHANGELOG.md | 58 | ||||
-rw-r--r-- | app/views/shared/issuable/_milestone_dropdown.html.haml | 4 | ||||
-rw-r--r-- | spec/features/issues/filter_by_milestone_spec.rb | 22 |
3 files changed, 82 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fcf917c1702..652f37ea044 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,64 @@ Please view this file on the master branch, on stable branches it's out of date. - Removes any symlinks before importing a project export file. CVE-2016-9086 - Fixed Import/Export foreign key issue to do with project members. +## 8.14.0 (2016-11-22) +- Fix Milestone dropdown not stay selected for `Upcoming` and `No Milestone` option !7117 +- Backups do not fail anymore when using tar on annex and custom_hooks only. !5814 +- Adds user project membership expired event to clarify why user was removed (Callum Dryden) +- Trim leading and trailing whitespace on project_path (Linus Thiel) +- Prevent award emoji via notes for issues/MRs authored by user (barthc) +- Adds an optional path parameter to the Commits API to filter commits by path (Luis HGO) +- Fix Markdown styling inside reference links (Jan Zdráhal) +- Fix extra space on Build sidebar on Firefox !7060 +- Fail gracefully when creating merge request with non-existing branch (alexsanford) +- Fix mobile layout issues in admin user overview page !7087 +- Fix HipChat notifications rendering (airatshigapov, eisnerd) +- Refactor Jira service to use jira-ruby gem +- Improved todos empty state +- Add hover to trash icon in notes !7008 (blackst0ne) +- Hides project activity tabs when features are disabled +- Only show one error message for an invalid email !5905 (lycoperdon) +- Fix sidekiq stats in admin area (blackst0ne) +- Added label description as tooltip to issue board list title +- Created cycle analytics bundle JavaScript file +- API: Fix booleans not recognized as such when using the `to_boolean` helper +- Removed delete branch tooltip !6954 +- Stop unauthorized users dragging on milestone page (blackst0ne) +- Restore issue boards welcome message when a project is created !6899 +- Do not show tooltip for active element !7105 (winniehell) +- Escape ref and path for relative links !6050 (winniehell) +- Fixed link typo on /help/ui to Alerts section. !6915 (Sam Rose) +- Fix filtering of milestones with quotes in title (airatshigapov) +- Refactor less readable existance checking code from CoffeeScript !6289 (jlogandavison) +- Update mail_room and enable sentinel support to Reply By Email (!7101) +- Add task completion status in Issues and Merge Requests tabs: "X of Y tasks completed" (!6527, @gmesalazar) +- Simpler arguments passed to named_route on toggle_award_url helper method +- Fix typo in framework css class. !7086 (Daniel Voogsgerd) +- New issue board list dropdown stays open after adding a new list +- Fix: Backup restore doesn't clear cache +- Optimize Event queries by removing default order +- Remove duplicate links from sidebar +- API: Fix project deploy keys 400 and 500 errors when adding an existing key. !6784 (Joshua Welsh) +- Add Rake task to create/repair GitLab Shell hooks symlinks !5634 +- Add job for removal of unreferenced LFS objects from both the database and the filesystem (Frank Groeneveld) +- Replace jquery.cookie plugin with js.cookie !7085 +- Use MergeRequestsClosingIssues cache data on Issue#closed_by_merge_requests method +- Fix Sign in page 'Forgot your password?' link overlaps on medium-large screens +- Show full status link on MR & commit pipelines +- Fix documents and comments on Build API `scope` +- Initialize Sidekiq with the list of queues used by GitLab +- Refactor email, use setter method instead AR callbacks for email attribute (Semyon Pupkov) +- Shortened merge request modal to let clipboard button not overlap +- In all filterable drop downs, put input field in focus only after load is complete (Ido @leibo) +- Improve search query parameter naming in /admin/users !7115 (YarNayar) +- Fix table pagination to be responsive +- Allow to search for user by secondary email address in the admin interface(/admin/users) !7115 (YarNayar) + +## 8.13.3 + +- Fix relative links in Markdown wiki when displayed in "Project" tab !7218 +- Reduce the overhead to calculate number of open/closed issues and merge requests within the group or project +- Fix project features default values ## 8.13.2 (2016-10-31) diff --git a/app/views/shared/issuable/_milestone_dropdown.html.haml b/app/views/shared/issuable/_milestone_dropdown.html.haml index f27a9002ec2..40fe53e6a8d 100644 --- a/app/views/shared/issuable/_milestone_dropdown.html.haml +++ b/app/views/shared/issuable/_milestone_dropdown.html.haml @@ -1,10 +1,10 @@ - project = @target_project || @project - extra_class = extra_class || '' - show_menu_above = show_menu_above || false -- selected_text = selected.try(:title) +- selected_text = selected.try(:title) || params[:milestone_title] - dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by milestone") - if selected.present? - = hidden_field_tag(name, name == :milestone_title ? selected.title : selected.id) + = hidden_field_tag(name, name == :milestone_title ? selected_text : selected.id) = dropdown_tag(milestone_dropdown_label(selected_text), options: { title: dropdown_title, toggle_class: "js-milestone-select js-filter-submit #{extra_class}", filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone", placeholder: "Search milestones", footer_content: project.present?, data: { show_no: true, show_menu_above: show_menu_above, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected.try(:title), project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do - if project diff --git a/spec/features/issues/filter_by_milestone_spec.rb b/spec/features/issues/filter_by_milestone_spec.rb index 485dc560061..9dfa5d1de19 100644 --- a/spec/features/issues/filter_by_milestone_spec.rb +++ b/spec/features/issues/filter_by_milestone_spec.rb @@ -11,6 +11,7 @@ feature 'Issue filtering by Milestone', feature: true do visit_issues(project) filter_by_milestone(Milestone::None.title) + expect(page).to have_css('.milestone-filter .dropdown-toggle-text', text: 'No Milestone') expect(page).to have_css('.issue', count: 1) end @@ -22,6 +23,7 @@ feature 'Issue filtering by Milestone', feature: true do visit_issues(project) filter_by_milestone(Milestone::Upcoming.title) + expect(page).to have_css('.milestone-filter .dropdown-toggle-text', text: 'Upcoming') expect(page).to have_css('.issue', count: 0) end @@ -33,6 +35,7 @@ feature 'Issue filtering by Milestone', feature: true do visit_issues(project) filter_by_milestone(Milestone::Upcoming.title) + expect(page).to have_css('.milestone-filter .dropdown-toggle-text', text: 'Upcoming') expect(page).to have_css('.issue', count: 1) end @@ -44,6 +47,7 @@ feature 'Issue filtering by Milestone', feature: true do visit_issues(project) filter_by_milestone(Milestone::Upcoming.title) + expect(page).to have_css('.milestone-filter .dropdown-toggle-text', text: 'Upcoming') expect(page).to have_css('.issue', count: 0) end end @@ -55,9 +59,27 @@ feature 'Issue filtering by Milestone', feature: true do visit_issues(project) filter_by_milestone(milestone.title) + expect(page).to have_css('.milestone-filter .dropdown-toggle-text', text: milestone.title) expect(page).to have_css('.issue', count: 1) end + context 'when milestone has single quotes in title' do + background do + milestone.update(name: "rock 'n' roll") + end + + scenario 'filters by a specific Milestone', js: true do + create(:issue, project: project, milestone: milestone) + create(:issue, project: project) + + visit_issues(project) + filter_by_milestone(milestone.title) + + expect(page).to have_css('.milestone-filter .dropdown-toggle-text', text: milestone.title) + expect(page).to have_css('.issue', count: 1) + end + end + def visit_issues(project) visit namespace_project_issues_path(project.namespace, project) end |