Flyspray - The bug killer!

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Database Queries
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Low
  • Reported Version 1.0-rc9
  • Due in Version 1.0-rc10
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Flyspray - The bug killer!
Opened by Dennis Busch - 12.02.2020
Last edited by peterdd - 17.02.2020

FS#2591 - '+' in search strings (bug tracker search function fails for some package name)

Steps done to reproduce the problem:

  1. click “Bug Reports”
  2. see that results are empty (unexpected but experienced behavior)
  3. remove the “+” from the end in the search field and search again
  4. see the bugs for that package (should already display in step 3 without having to adjust the search name)
Closed by  peterdd
17.02.2020 15:36
Reason for closing:  Fixed in devel
Project Manager

It is

$likeWord = '%' . str_replace('+', ' ', $word) . '%';

in includes/class.backend.php in function get_task_list()

https://github.com/Flyspray/flyspray/blob/afa209b9f7c531c7d082c1b0ac21433b682256a1/includes/class.backend.php#L1767

The replacement of '+' with ' ' of search keywords was introduced with https://sourceforge.net/p/flyspray/svn/757/ on 2006-08-11 by @floele, before the earliest git commits on github.com/Flyspray/flyspray

I do not know, but my assumption: Maybe this is a hidden feature for searching 'word followed by word(s)'. For instance the search string 'fly spray' would search for 'fly' and/or 'spray' in the summary/details/comments. But searching 'fly+spray' would search for 'fly' followed by ' ' followed by 'spray'.

Another example would be the searchstring 'php7 php+7': This finds php7, but also 'php 7'. But not 'php on the 7 continents'.

So how to handle the edge case 'memtest86+', the '+' on the last char of a word?

2 ideas:

  1. Just another trim() after the replace? So 'memtest86+' searches just for 'memtest86'?
  2. Ignore the '+' for replacement if it is at the end of a word? (or also start of a word like a +_+ emoticon)

Or

  • Remove the '+' feature and '+' is just part of search words, so 'c++' or 'M+S' would be found as expected.

Another edge case: searching 'c++'

  • with idea 1 would search 'c', mmh would probably find way too much.
  • with idea 2 would search 'c +' , little bit better, but would not find 'c++'
Project Manager

Fixed in github master now. Combined idea 1 with idea 2 as fix.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing