Project

General

Profile

calculate total spent time of a proyect

Added by Ignacio Toscano about 14 years ago

Hi, i'm trying to calculate the total spent time of a project, so someone can tell me where i can see, at the data base, the spent time of a issue?
Thanks


Replies (3)

RE: calculate total spent time of a proyect - Added by Felix Schäfer about 14 years ago

It is not recommended to work with the DB directly as the schema can change at any moment, but if you want to have a look at how redmine calculates them, start redmine in development mode and visit the redmine page that holds that information. In development mode, all SQL statements will be logged to log/development.log, and you can then look there for what you need.

RE: calculate total spent time of a proyect - Added by Eric Davis about 14 years ago

This Ruby code will calculate the total hours for project 1.

TimeEntry.sum(:hours, :conditions => {:project_id => 1})

Eric Davis

RE: calculate total spent time of a proyect - Added by Ignacio Toscano about 14 years ago

thanks you both, that was really usefull ^^

    (1-3/3)