Comments (4)
1+
ActiveRecord::StatementInvalid (PG::Error: FEHLER: Spalte »issues.tracker_id« muss in der GROUP-BY-Klausel erscheinen oder in einer Aggregatfunktion verwendet werden
LINE 1: SELECT issues.*, sum(hours) as spent FROM "issues" left join...
: SELECT issues.*, sum(hours) as spent FROM "issues" left join time_entries ON time_entries.issue_id = issues.id WHERE (issues.project_id = 30 and status_id = 1 and assigned_to_id = 6) GROUP BY issues.id ORDER BY case when issues.ir_position is null then 1 else 0 end ASC, case when issues.ir_position is NULL then issues.id else issues.ir_position end ASC):
Select with * (all_fields from issues) but in the group_by is only issues.id
from agiledwarf.
I don't think it was your migration. I'm seeing the same thing when clicking on either the Run Charts or the Tasks tab.
Redmine: 2.12
Postgres: 8.4
Agile Dwarf: 0.0.3
Centos 5.x
Jruby: 1.6.8
Started GET "/adtasks/list?project_id=myproject" for 192.168.1.1 at Wed Nov 07 17:50:10 UTC 2012
Processing by AdtasksController#list as HTML
Parameters: {"project_id"=>"myproject"}
Current user: leeto2 (id=42)
Completed 500 Internal Server Error in 282ms
ActiveRecord::StatementInvalid (ActiveRecord::JDBCError: ERROR: column "issues.tracker_id" must appear in the GROUP BY clause or be used in an aggregate function
Position: 8: SELECT issues.*, sum(hours) as spent FROM "issues" left join time_entries ON time_entries.issue_id = issues.id WHERE (issues.project_id = 13 and status_id = 1 and fixed_version_id = '134' and assigned_to_id = 42) GROUP BY issues.id ORDER BY case when issues.ir_position is null then 1 else 0 end ASC, case when issues.ir_position is NULL then issues.id else issues.ir_position end ASC):
arjdbc/jdbc/RubyJdbcConnection.java:191:in `execute'
I'm new to Ruby. How can I figure out what module has the query in it? (short of doing a search and grepping for it.
Anything else I can do to help?
Thanks,
Leeto2
from agiledwarf.
Hello,
I did not have time to look at this myself.
But from the error message I read that basically the Adtask Controller in
the list command is miss behaving.
In SQL you have to have all fields upon which you apply calculus in the
group by list of fields. You also have add the accompanying fields. So by
stating issues.* next to a sum() I guess postgres want you you add all
those fields to the group by definition.
I would need to look at the data base to be sure. Postgres is much more
rigid about this sort of things than mysql.
You can have a look here to give you ideas :
http://stackoverflow.com/questions/1769361/postgresql-group-by-different-from-mysql
http://practiceovertheory.com/blog/2009/09/23/postgresql-s-group-by/
Personally I would rewrite the query to conform with standard SQL and
treat mysql as the exception. Otherwise if I connect the plugin to an
other database like Oracle, you will end up with the same issue.
Cheers,
I don't think it was your migration. I'm seeing the same thing when
clicking on either the Run Charts or the Tasks tab.
Redmine: 2.12
Postgres: 8.4
Agile Dwarf: 0.0.3
Centos 5.x
Jruby: 1.6.8
Started GET "/adtasks/list?project_id=myproject" for 192.168.1.1 at Wed
Nov 07 17:50:10 UTC 2012
Processing by AdtasksController#list as HTML
Parameters: {"project_id"=>"myproject"}
Current user: leeto2 (id=42)
Completed 500 Internal Server Error in 282msActiveRecord::StatementInvalid (ActiveRecord::JDBCError: ERROR: column
"issues.tracker_id" must appear in the GROUP BY clause or be used in an
aggregate function
Position: 8: SELECT issues.*, sum(hours) as spent FROM "issues" left
join time_entries ON time_entries.issue_id = issues.id WHERE
(issues.project_id = 13 and status_id = 1 and fixed_version_id = '134'
and assigned_to_id = 42) GROUP BY issues.id ORDER BY case when
issues.ir_position is null then 1 else 0 end ASC, case when
issues.ir_position is NULL then issues.id else issues.ir_position end
ASC):
arjdbc/jdbc/RubyJdbcConnection.java:191:in `execute'
I'm new to Ruby. How can I figure out what module has the query in it?
(short of doing a search and grepping for it.
Anything else I can do to help?Thanks,
Leeto2
Reply to this email directly or view it on GitHub:
#44 (comment)
Cordialement,
Philippe Laliberté
[email protected]
http://www.linkedin.com/in/plaliberte
+1 418 478 2055
from agiledwarf.
Fixed the Tasks issue. It's a hack but it works. Edit \AgileDwarf\app\models\sprints_tasks.rb
Find SprintsTasks.Find and look for group ==>
change it to this: (note the double quotes has been changed to single tics.):
:group => issues.id,issues.tracker_id,issues.project_id,issues.subject,issues.description,issues.due_date,issues.category_id,issues.status_id,issues.assigned_to_id,issues.priority_id,issues.fixed_version_id,issues.author_id,issues.lock_version,issues.created_on,issues.updated_on,issues.start_date,issues.done_ratio,issues.estimated_hours,issues.parent_id,issues.root_id,issues.lft,issues.rgt,issues.is_private,issues.ir_position',
from agiledwarf.
Related Issues (20)
- ruby2/rails3/redmine 2.3 DEPRECATION WARNINGs
- layout fix: adapt column size dependent von number of columns configured
- redmine 2.3 ActiveRecord::StatementInvalid
- Tasks not showing Redmine 1.3.2
- Pg 8.4 support for Run charts HOT 2
- Postgres Error on Run Charts HOT 4
- Agile Dwraf config/setup
- Agile Dwarf plugin installation with Redmine 1.x
- Can't set dates for sprints using inline date picker for dd/mm/yy locale
- increasing number of columns in sprint view
- Installing with Bitnami Redmine HOT 1
- Error on issue view after installing AgileDwarf in Redmine 2.4.2 HOT 1
- Reorder menu tabs
- Redmine 3.0 suport HOT 13
- What is the license of this code?
- Internal error HOT 3
- NoMethodError (undefined method `scoped' for #<Class:0x00000008525730>) HOT 1
- AgileDwarf in Redmine 3.3.0
- Plugin Agile install stop emails notifiation.
- migration failed => NoMethodError: undefined method `alias_method_chain'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agiledwarf.