Description of problem: sql error of invalid input syntax for type numeric when custom search hours left/worked is (not) empty Version-Release number of selected component (if applicable): 4.4.9039-3 How reproducible: Always Steps to Reproduce: 1.Custom search: Hours Left is (not) empty Hours worked is (not) empty Actual results: DBD::Pg::db selectcol_arrayref failed: ERROR: invalid input syntax for type numeric: "" LINE 13: ... bugs.remaining_time IS NULL OR bugs.remaining_time = '' ) ) ^ [for Statement "SELECT bugs.bug_id AS bug_id, bugs.priority AS priority, bugs.bug_severity AS bug_severity FROM bugs Expected results: no sql error Additional info:
This is a general problem with filter selection. The filters include all the possible filters for all the possible field types, allowing the user to select invalid combinations of field and filter. What should happen is that when you chose a field to search on the filters should be ... filtered ... to exclude invalid filters for the chosen field. e.g. content only has two valid filters, matches and does not match, so only these two filters should be available when you chose to search the content field.
*** Bug 1257479 has been marked as a duplicate of this bug. ***
*** Bug 1264778 has been marked as a duplicate of this bug. ***
*** Bug 1264779 has been marked as a duplicate of this bug. ***
*** Bug 1257449 has been marked as a duplicate of this bug. ***
*** Bug 1207506 has been marked as a duplicate of this bug. ***
*** Bug 1679014 has been marked as a duplicate of this bug. ***
Adding this to RH6 to properly scope out creating a mapping for this.
This actually works in BMO, so it is most like a postgresql casting issue. It's going to be a big effort so moving to the next target milestone.
It turns out that this is due to some field having their type set to 0, updating the field to the correct type fixes issues where it's supplying the wrong empty type to the DB. e.g. '' instead of 0 for integers.
Test environment: https://bugzilla-qe-rdu2.usersys.redhat.com Steps to verify: 1. Check the table fielddefs, find the field type changed or not. Result: The following items changed type to 10 (FIELD_TYPE_INTEGER) 'bug_agile_pool.pool_id', 'bug_agile_pool.pool_order', 'docs_contact', 'ext_bz_bug_map.ext_bz_bug_id', 'percentage_complete', 'reporter_accessible', 'rh_rule', 'votes' And bug_id is changed type to 6 FIELD_TYPE_BUG_ID. 'creation_ts' and 'delta_ts' is changed type to 5. 2. Advance search, custom search, choose 'Bug ID' is equal to a numeric value 1360309 Result: Can search this bug out 3. Advance search, custom search, choose 'Bug ID' is equal to a numeric value 'slkdfjlsdf' Result:The value 'slkdfjlsdf' in the Bug ID field is not a numeric value. 4. Advance search, custom search, choose 'Pool ID' is equal to a numeric value 2 Result: Can search bugs which belong to this pool 5. Advance search, custom search, choose 'Creation Date' contains the string '2016-07-26' Result: Can search bugs which belong to this date Test Result: PASS
This change has been deployed to https://partner-bugzilla.redhat.com for public pre-production testing.
This change is now live. If there are any issues, do not reopen this bug. Instead, you should create a new bug and reference this bug.