Defect #9936

Error when displaying an issue from a query sorted by an association

Added by Philippe Lafoucrière almost 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:-
Resolution:Fixed Affected version:

Description

Hi, since approximately one week, we have this error raising when we're getting issues#show :

Processing IssuesController#show (for xx.xx.xx.xx at 2012-01-06 10:16:28) [GET]
  Parameters: {"action"=>"show", "id"=>"3411", "controller"=>"issues"}
Query::StatementInvalid: PGError: ERROR:  missing FROM-clause entry for table "enumerations" 
LINE 1: ...les em WHERE em.name='issue_tracking'))  ORDER BY enumeratio...
                                                             ^
: SELECT issues.id FROM "issues"  LEFT OUTER JOIN "projects" ON "projects".id = "issues".project_id  LEFT OUTER JOIN "issue_statuses" ON "issue_statuses".id = "issues".status_id WHERE ((issues.status_id IN (SELECT id FROM issue_statuses WHERE is_closed='f')) AND projects.id = 23) AND (projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking'))  ORDER BY enumerations.position DESC, issues.root_id, issues.lft ASC, users.firstname, users.lastname, users.id LIMIT 501
Rendering template within layouts/base
Rendering common/error (500)

Thanks
Philippe

Associated revisions

Revision 8569
Added by Jean-Philippe Lang almost 6 years ago

Fixed: error when displaying an issue with a query sorted by an association, eg. priority (#9936).

History

#1 Updated by Jean-Philippe Lang almost 6 years ago

  • Subject changed from Query::StatementInvalid: PGError: ERROR: missing FROM-clause entry for table "enumerations" to Error when displaying an issue from a query sorted by an association
  • Category set to Issues
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Introduced in r8488 and fixed in r8569. Thanks for pointing this out.

Also available in: Atom PDF