OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[35744] Use case-insenstive string comparison for action boards (#9112)
Oliver Günther57034bc7d6cc
diff --git a/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.tsindex e7a3354ab13..79168cee2cd 100644--- a/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts+++ b/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts@@ -3,7 +3,7 @@ import {BoardActionService} from "core-app/modules/boards/board/board-actions/boimport {input} from "reactivestates";import {HalResource} from "core-app/modules/hal/resources/hal-resource";import {Observable} from "rxjs";-import {filter, map, take} from "rxjs/operators";+import {map, take} from "rxjs/operators";import {Board} from "core-app/modules/boards/board/board";@Injectable()@@ -21,7 +21,9 @@ export abstract class CachedBoardActionService extends BoardActionService {.pipe(map(results => {if (matching) {- return results.filter(resource => resource.name.includes(matching));+ return results.filter(resource =>+ new RegExp(matching, 'i').test(resource.name)+ );} else {return results;}diff --git a/modules/boards/spec/features/action_boards/status_board_spec.rb b/modules/boards/spec/features/action_boards/status_board_spec.rbindex 456cb97db3e..2ccfbdc705f 100644--- a/modules/boards/spec/features/action_boards/status_board_spec.rb+++ b/modules/boards/spec/features/action_boards/status_board_spec.rb@@ -84,6 +84,19 @@ describe 'Status action board', type: :feature, js: true doendcontext 'with full boards permissions' do+ it 'can add a case-insensitive list (Regression #35744)' do+ board_index.visit!++ # Create new board+ board_page = board_index.create_board action: :Status++ # expect lists of default status+ board_page.expect_list 'Open'++ board_page.add_list option: 'Closed', query: 'closed'+ board_page.expect_list 'Closed'+ end+it 'allows management of boards' doboard_index.visit!diff --git a/modules/boards/spec/features/support/board_page.rb b/modules/boards/spec/features/support/board_page.rbindex 0e3ec4e2dc0..66e954c32c8 100644--- a/modules/boards/spec/features/support/board_page.rb+++ b/modules/boards/spec/features/support/board_page.rb@@ -177,7 +177,7 @@ module Pages.performend- def add_list(option: nil)+ def add_list(option: nil, query: option)if option.nil? && action?raise "Must pass value option for action boards"end@@ -188,7 +188,7 @@ module Pagespage.find('.boards-list--add-item').clickexpect(page).to have_selector('.board-list--container', count: count + 1)else- open_and_fill_add_list_modal option+ open_and_fill_add_list_modal querypage.find('.ng-option-label', text: option, wait: 10).clickclick_on 'Add'end