Flyspray - The bug killer!

  • Status Confirmed
  • Percent Complete
    90%
  • Task Type Bug Report
  • Category Backend/Core
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Medium
  • Reported Version 1.0-rc
  • Due in Version 1.0
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Flyspray - The bug killer!
Opened by peterdd - 19.04.2016
Last edited by peterdd - 03.02.2018

FS#2121 - 'my assigned tasks' uses like %?% search instead of user_id

Problem: https://github.com/Flyspray/flyspray/pull/552

The button ‘My assigned tasks’ should search only by userid, not in username or realname with the LIKE ‘%...%’ operator.

Currently the button is using the same as doing an advanced search filling the ‘Assigned To’ input field. (currently ‘dev’ param) But that search param searches in userid, username and realname.

Edit: Implemented simpler solution: if param is digitsonly, then search by userid, otherwise by username and realname if that param exists.

Project Manager
peterdd commented on 21.04.2016 11:52

A bigger solution to the problem and also enhances the advanced search:

A hidden radio button set for

  • assigned user (short variable 'dev' used instead of 'ass' ;-) )
  • opened by
  • closed by

Example html code for the assigned user field: (CSS for the toggling behavior similiar to other like keyboards shortcuts not included)

<div style="position: absolute; right: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; padding: 10px; box-shadow: 0px 10px 20px rgb(204, 204, 204);" id="devsearchmode" class="toggle">
  <input type="radio" name="devsm" value="" id="devsm_default">
  <label for="devsm_default">LIKE (default)</label><br>
 
  <input type="radio" name="devsm" value="id" id="devsm_userid">
  <label for="devsm_userid">exact user_id</label><br>
 
  <input type="radio" name="devsm" value="username" id="devsm_username">
  <label for="devsm_username">exact username</label><br>
 
  <input type="radio" name="devsm" value="realname" id="devsm_realname">
  <label for="devsm_realname">exact realname</label><br>
</div>

When the autocompleter popups up and the user selects one of the search hits, the hidden radio button group should choose 'devsearchmode_username' instead of default soft search. (The user wants exact this user eg. peterdd, not peterdd1234 or blablapeterdd)

To solve the 'My assigned tasks' view the url would change from

?do=index&project=1&dev=12345

to

?do=index&project=1&dev=12345&devsm=userid

or

?project=1&mytasks 

(and /proj1/mytasks with htaccess rewrite nice urls enabled)

Project Manager
peterdd commented on 22.04.2016 02:38
Project Manager
peterdd commented on 03.02.2018 09:55

Ahh, dropped that idea above.

I commited a simpler solution now to github master:

  • forbid digitonly user_name and real_name at create_user() function
  • in search, when parameter opened_by, assigned, or closed_by values are digits, then only search by that user_id, and if it looks like a user_name or real_name, then do a LIKE sql filter.

Better than before I think, but note that searching 'peter' in the opened_by field still would find tasks opened by peter, but also peterdd, 123peter, 'Peter Pan', ...

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing