Fix/non matching pagination (#9202)
* fix duplicates returned for wp list on multiple matching attachments/comments LEFT JOIN leads to potentially having multiple records returned if a search string is present in more than one attachment/comment. This is not a problem if we fetch work packages directly out of the query results but becomes problematic if only the id is fetched and then used to get the work packages by a subquery. * attachment filters no longer differentiate on tsv_where concatenation As EXISTS and NOT EXISTS is now used, the full string is always to be searched for so `and` concatenation is now always employed. * adapt spec Work packages that have no attachment at all are now also considered to match the filter if a "doesn`t contain" operator is used * less strict rspec rubocops for feature specs * cleanup codepull/9211/head
parent
f3dca831f5
commit
ce5e06dde2
@ -1,40 +0,0 @@ |
||||
#-- encoding: UTF-8 |
||||
|
||||
#-- copyright |
||||
# OpenProject is an open source project management software. |
||||
# Copyright (C) 2012-2021 the OpenProject GmbH |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: |
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang |
||||
# Copyright (C) 2010-2013 the ChiliProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License |
||||
# as published by the Free Software Foundation; either version 2 |
||||
# of the License, or (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
# |
||||
# See docs/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
module Queries::WorkPackages::Filter::FilterOnTsvMixin |
||||
def concatenation |
||||
case operator |
||||
when '~' |
||||
:and |
||||
when '!~' |
||||
:and_not |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue