View Issue Details

IDProjectCategoryView StatusLast Update
0023268mantisbtdb oraclepublic2017-10-08 23:52
ReportercproensaAssigned Tocproensa 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.6.0 
Target Version2.7.0Fixed in Version2.7.0 
Summary0023268: Error filtering custom fields of type date
Description

With oracle database.
When trying to filter on a custom field of type DATE, an error in sql query occurs.

ORA-00905: missing keyword para la consulta: SELECT Count( DISTINCT m_bug.id ) idcnt FROM m_bug JOIN m_project ON m_project.id = m_bug.project_id LEFT JOIN m_custom_field_string m_custom_field_string_96 ON m_bug.id = m_custom_field_string_96.bug_id AND m_custom_field_string_96.field_id = 96 WHERE m_project.enabled=:0 AND ( ( m_bug.status in (:1, :2, :3, :4, :5, :6, :7, :8) ) AND ( CAST(COALESCE(NULLIF(m_custom_field_string_96.value, ''), '0') DECIMAL) != 0 AND CAST(COALESCE(NULLIF(m_custom_field_string_96.value, ''), '0') DECIMAL) < 1503784800) )

TagsNo tags attached.

Activities

Related Changesets

MantisBT: master 5a523672

2017-08-27 18:34:23

cproensa


Committer: dregad Details Diff
Fix oracle sql syntax for table alias

Fix the oracle syntax to not remove those "AS" that are part of CAST
expressions.

Oracle doesn't suppor AS keyword as part of table aliases.
Previous code was modifying the query sql to remove all appearances of
"AS". However, "AS" can also appear as part of a CAST expression:
CAST( x AS y )

Fixes: 0023268
mod - core/database_api.php Diff File

Issue History

Date Modified Username Field Change
2017-08-27 14:47 cproensa New Issue
2017-08-27 20:50 cproensa Note Added: 0057554
2017-08-27 20:50 cproensa Assigned To => cproensa
2017-08-27 20:50 cproensa Status new => assigned
2017-09-28 02:28 dregad Changeset attached => MantisBT master 5a523672
2017-09-28 02:28 cproensa Status assigned => resolved
2017-09-28 02:28 cproensa Resolution open => fixed
2017-09-28 02:28 cproensa Fixed in Version => 2.7.0
2017-09-28 02:32 atrol Target Version => 2.7.0
2017-10-08 23:52 vboctor Status resolved => closed