Add EstimatedTime (Estimated_Hours field) in SpentTime report
It looks useful to get Estimaterd_Hours column by the SpentHours when checking up the SpentTime tab of Projects plan (...redmine-site/time-entries tab).
Now there is no columns of EstimatedHours (Оценка времени, Оценка временных затрат in Rus-locales) able to be selected in the primary options filter. There is also no Estimated-Time checkbox to show the result statistics (it is wanted by planning team).
There is only ElapsedTime calculated field, which is malformed usually.
The current (in RM.5.1, RM.7.0 versions) release of the request looks like the Spent_Time SQL visualization, with the several extensions.
I have already made a little checkup, and got the plain SQL selection like wanted,
there is one:
select time_entries.id AS te_id, projects.name, issues.subject,users.firstname, users.lastname, comments,hours,issues.estimated_hours from redmine.time_entries JOIN users on redmine.time_entries.user_id = redmine.users.id JOIN issues on time_entries.issue_id = issues.id JOIN projects on time_entries.project_id = projects.id ;
The result header fields are:
\#\ - index
te_id - Time_Entries-ID - the master ID-key of result table
name - the Project Name
subject - Project Issue Title (IssueNme)
firstname, lastname - named-like fields of USERS table of the same index, or take the CONCAT-WS construction
comments - the spentTime comment
hours - the SpentTime Hours user-defined value
Estimated_Hours - the same-name author-specified field in the ISSUES table, there is NO ONE ! inside the Spent_Time table
The Estimated_Hours column should be summarized by its own in the ISSUES-table, because duplicated.
It may be more correct to use Outer-Join to get NULL-values as zero-valued ones.