Bug #15575 Searching for issues when creating a duplicate entry
Submitted: 8 Dec 2005 8:54 Modified: 9 Dec 2005 5:10
Reporter: Dan Karran Email Updates:
Status: Closed Impact on me:
None 
Category:Eventum Severity:S2 (Serious)
Version: OS:
Assigned to: Bryan Alsdorf CPU Architecture:Any

[8 Dec 2005 8:54] Dan Karran
Description:
When attempting to create a duplicate record: 

Clicking on the search button next to the input field to look for another entry, if you try to search for text that does not exist in the list, eventum refreshes the whole page with an empty list of values and then does not allow you to search for projects. In addition, it sends two email errors to the administrator, as follows:

An error was found at 12/07/2005 23:22:28 (1133994148) on line '3275' of script '/home/support/public_html/eventum/include/class.issue.php'.

The error message passed to us was:

'DB Error: syntax error'

A more detailed error message follows:

'SELECT
                    iss_id,
                    iss_summary
                 FROM
                    support.eventum_issue
                 WHERE
                    iss_prj_id=1 AND iss_duplicated_iss_id IS NULL AND iss_id <> 
                 ORDER BY
                    iss_id ASC [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY

                    iss_id ASC' at line 8]'

...

The user agent given was 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5'.

...

A backtrace is available:

Array
(
    [0] => Array
        (
            [file] => /home/veenpereh/support/public_html/eventum/duplicate.php
            [line] => 47
            [function] => getassoclist
            [class] => issue
            [type] => ::
        )

) 

How to repeat:
Duplicate a record, search for text which doesn't exist in the title of any existing bugs

Suggested fix:
Check value of entry ID sent to SQL to make sure it is a valid integer (at the moment it looks like it is crashing because it's being passed an empty value)
[9 Dec 2005 5:10] Bryan Alsdorf
Thanks for the report. This has been fixed and will be in our next release.