| 
									
										
										
										
											2019-03-16 09:37:35 +00:00
										 |  |  | # frozen_string_literal: true | 
					
						
							| 
									
										
										
										
											2019-03-15 01:32:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-15 13:23:13 +00:00
										 |  |  | # Redmine - project management software | 
					
						
							| 
									
										
										
										
											2023-01-01 06:19:35 +00:00
										 |  |  | # Copyright (C) 2006-2023  Jean-Philippe Lang | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | # modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | # as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | # of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  | # This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | # GNU General Public License for more details. | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  | # You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | # along with this program; if not, write to the Free Software | 
					
						
							|  |  |  | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module Redmine | 
					
						
							|  |  |  |   module DefaultData | 
					
						
							| 
									
										
										
										
											2019-05-21 23:53:10 +00:00
										 |  |  |     class DataAlreadyLoaded < StandardError; end | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     module Loader | 
					
						
							| 
									
										
										
										
											2009-02-21 11:04:50 +00:00
										 |  |  |       include Redmine::I18n | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  |       class << self | 
					
						
							|  |  |  |         # Returns true if no data is already loaded in the database | 
					
						
							|  |  |  |         # otherwise false | 
					
						
							|  |  |  |         def no_data? | 
					
						
							| 
									
										
										
										
											2012-12-03 18:21:32 +00:00
										 |  |  |           !Role.where(:builtin => 0).exists? && | 
					
						
							|  |  |  |             !Tracker.exists? && | 
					
						
							|  |  |  |             !IssueStatus.exists? && | 
					
						
							| 
									
										
										
										
											2020-04-28 07:10:59 +00:00
										 |  |  |             !Enumeration.exists? && | 
					
						
							|  |  |  |             !Query.exists? | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  |         end | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  |         # Loads the default data | 
					
						
							|  |  |  |         # Raises a RecordNotSaved exception if something goes wrong | 
					
						
							| 
									
										
										
										
											2016-12-31 12:53:38 +00:00
										 |  |  |         def load(lang=nil, options={}) | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  |           raise DataAlreadyLoaded.new("Some configuration data is already loaded.") unless no_data? | 
					
						
							|  |  |  |           set_language_if_valid(lang) | 
					
						
							| 
									
										
										
										
											2016-12-31 12:53:38 +00:00
										 |  |  |           workflow = !(options[:workflow] == false) | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |           Role.transaction do | 
					
						
							|  |  |  |             # Roles | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  |             manager = Role.create! :name => l(:default_role_manager), | 
					
						
							| 
									
										
										
										
											2011-04-15 13:23:13 +00:00
										 |  |  |                                    :issues_visibility => 'all', | 
					
						
							| 
									
										
										
										
											2014-11-11 13:08:52 +00:00
										 |  |  |                                    :users_visibility => 'all', | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |                                    :position => 1
 | 
					
						
							|  |  |  |             manager.permissions = manager.setable_permissions.collect {|p| p.name} | 
					
						
							|  |  |  |             manager.save! | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-04 13:59:06 +00:00
										 |  |  |             developer = | 
					
						
							|  |  |  |               Role.create!( | 
					
						
							|  |  |  |                 :name => l(:default_role_developer), | 
					
						
							|  |  |  |                 :position => 2, | 
					
						
							|  |  |  |                 :permissions => [ | 
					
						
							|  |  |  |                   :manage_versions, | 
					
						
							|  |  |  |                   :manage_categories, | 
					
						
							|  |  |  |                   :view_issues, | 
					
						
							|  |  |  |                   :add_issues, | 
					
						
							|  |  |  |                   :edit_issues, | 
					
						
							|  |  |  |                   :view_private_notes, | 
					
						
							|  |  |  |                   :set_notes_private, | 
					
						
							|  |  |  |                   :manage_issue_relations, | 
					
						
							|  |  |  |                   :manage_subtasks, | 
					
						
							|  |  |  |                   :add_issue_notes, | 
					
						
							|  |  |  |                   :save_queries, | 
					
						
							|  |  |  |                   :view_gantt, | 
					
						
							|  |  |  |                   :view_calendar, | 
					
						
							|  |  |  |                   :log_time, | 
					
						
							|  |  |  |                   :view_time_entries, | 
					
						
							|  |  |  |                   :view_news, | 
					
						
							|  |  |  |                   :comment_news, | 
					
						
							|  |  |  |                   :view_documents, | 
					
						
							|  |  |  |                   :view_wiki_pages, | 
					
						
							|  |  |  |                   :view_wiki_edits, | 
					
						
							|  |  |  |                   :edit_wiki_pages, | 
					
						
							|  |  |  |                   :delete_wiki_pages, | 
					
						
							|  |  |  |                   :view_messages, | 
					
						
							|  |  |  |                   :add_messages, | 
					
						
							|  |  |  |                   :edit_own_messages, | 
					
						
							|  |  |  |                   :view_files, | 
					
						
							|  |  |  |                   :manage_files, | 
					
						
							|  |  |  |                   :browse_repository, | 
					
						
							|  |  |  |                   :view_changesets, | 
					
						
							|  |  |  |                   :commit_access, | 
					
						
							|  |  |  |                   :manage_related_issues | 
					
						
							|  |  |  |                 ] | 
					
						
							|  |  |  |               ) | 
					
						
							|  |  |  |             reporter = | 
					
						
							|  |  |  |               Role.create!( | 
					
						
							|  |  |  |                 :name => l(:default_role_reporter), | 
					
						
							|  |  |  |                 :position => 3, | 
					
						
							|  |  |  |                 :permissions => [ | 
					
						
							|  |  |  |                   :view_issues, | 
					
						
							|  |  |  |                   :add_issues, | 
					
						
							|  |  |  |                   :add_issue_notes, | 
					
						
							|  |  |  |                   :save_queries, | 
					
						
							|  |  |  |                   :view_gantt, | 
					
						
							|  |  |  |                   :view_calendar, | 
					
						
							|  |  |  |                   :log_time, | 
					
						
							|  |  |  |                   :view_time_entries, | 
					
						
							|  |  |  |                   :view_news, | 
					
						
							|  |  |  |                   :comment_news, | 
					
						
							|  |  |  |                   :view_documents, | 
					
						
							|  |  |  |                   :view_wiki_pages, | 
					
						
							|  |  |  |                   :view_wiki_edits, | 
					
						
							|  |  |  |                   :view_messages, | 
					
						
							|  |  |  |                   :add_messages, | 
					
						
							|  |  |  |                   :edit_own_messages, | 
					
						
							|  |  |  |                   :view_files, | 
					
						
							|  |  |  |                   :browse_repository, | 
					
						
							|  |  |  |                   :view_changesets | 
					
						
							|  |  |  |                 ] | 
					
						
							|  |  |  |               ) | 
					
						
							| 
									
										
										
										
											2009-11-14 12:08:47 +00:00
										 |  |  |             Role.non_member.update_attribute :permissions, [:view_issues, | 
					
						
							|  |  |  |                                                             :add_issues, | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |                                                             :add_issue_notes, | 
					
						
							|  |  |  |                                                             :save_queries, | 
					
						
							|  |  |  |                                                             :view_gantt, | 
					
						
							|  |  |  |                                                             :view_calendar, | 
					
						
							|  |  |  |                                                             :view_time_entries, | 
					
						
							| 
									
										
										
										
											2017-06-07 20:25:25 +00:00
										 |  |  |                                                             :view_news, | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |                                                             :comment_news, | 
					
						
							|  |  |  |                                                             :view_documents, | 
					
						
							|  |  |  |                                                             :view_wiki_pages, | 
					
						
							| 
									
										
										
										
											2008-09-14 10:54:19 +00:00
										 |  |  |                                                             :view_wiki_edits, | 
					
						
							| 
									
										
										
										
											2017-06-07 20:20:22 +00:00
										 |  |  |                                                             :view_messages, | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |                                                             :add_messages, | 
					
						
							|  |  |  |                                                             :view_files, | 
					
						
							|  |  |  |                                                             :browse_repository, | 
					
						
							|  |  |  |                                                             :view_changesets] | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 12:08:47 +00:00
										 |  |  |             Role.anonymous.update_attribute :permissions, [:view_issues, | 
					
						
							|  |  |  |                                                            :view_gantt, | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |                                                            :view_calendar, | 
					
						
							|  |  |  |                                                            :view_time_entries, | 
					
						
							| 
									
										
										
										
											2017-06-07 20:25:25 +00:00
										 |  |  |                                                            :view_news, | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |                                                            :view_documents, | 
					
						
							|  |  |  |                                                            :view_wiki_pages, | 
					
						
							| 
									
										
										
										
											2008-09-14 10:54:19 +00:00
										 |  |  |                                                            :view_wiki_edits, | 
					
						
							| 
									
										
										
										
											2017-06-07 20:20:22 +00:00
										 |  |  |                                                            :view_messages, | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |                                                            :view_files, | 
					
						
							|  |  |  |                                                            :browse_repository, | 
					
						
							|  |  |  |                                                            :view_changesets] | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |             # Issue statuses | 
					
						
							| 
									
										
										
										
											2014-11-02 19:45:14 +00:00
										 |  |  |             new       = IssueStatus.create!(:name => l(:default_issue_status_new), :is_closed => false, :position => 1) | 
					
						
							|  |  |  |             in_progress  = IssueStatus.create!(:name => l(:default_issue_status_in_progress), :is_closed => false, :position => 2) | 
					
						
							|  |  |  |             resolved  = IssueStatus.create!(:name => l(:default_issue_status_resolved), :is_closed => false, :position => 3) | 
					
						
							|  |  |  |             feedback  = IssueStatus.create!(:name => l(:default_issue_status_feedback), :is_closed => false, :position => 4) | 
					
						
							|  |  |  |             closed    = IssueStatus.create!(:name => l(:default_issue_status_closed), :is_closed => true, :position => 5) | 
					
						
							|  |  |  |             rejected  = IssueStatus.create!(:name => l(:default_issue_status_rejected), :is_closed => true, :position => 6) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Trackers | 
					
						
							| 
									
										
										
										
											2021-07-28 16:26:22 +00:00
										 |  |  |             bug = Tracker.create!(:name => l(:default_tracker_bug), :default_status_id => new.id, :is_in_roadmap => false, :position => 1) | 
					
						
							|  |  |  |             feature = Tracker.create!(:name => l(:default_tracker_feature), :default_status_id => new.id, :is_in_roadmap => true, :position => 2) | 
					
						
							|  |  |  |             support = Tracker.create!(:name => l(:default_tracker_support), :default_status_id => new.id, :is_in_roadmap => false, :position => 3) | 
					
						
							| 
									
										
										
										
											2021-03-25 02:11:14 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # Set trackers as defaults for new projects | 
					
						
							|  |  |  |             Setting.default_projects_tracker_ids = [ | 
					
						
							|  |  |  |               bug.id.to_s, | 
					
						
							|  |  |  |               feature.id.to_s, | 
					
						
							|  |  |  |               support.id.to_s | 
					
						
							|  |  |  |             ] | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-31 12:53:38 +00:00
										 |  |  |             if workflow | 
					
						
							|  |  |  |               # Workflow | 
					
						
							| 
									
										
										
										
											2020-10-22 14:17:58 +00:00
										 |  |  |               Tracker.all.each do |t| | 
					
						
							|  |  |  |                 IssueStatus.all.each do |os| | 
					
						
							|  |  |  |                   IssueStatus.all.each do |ns| | 
					
						
							|  |  |  |                     unless os == ns | 
					
						
							|  |  |  |                       WorkflowTransition. | 
					
						
							|  |  |  |                         create!(:tracker_id => t.id, :role_id => manager.id, | 
					
						
							|  |  |  |                                 :old_status_id => os.id, | 
					
						
							|  |  |  |                                 :new_status_id => ns.id) | 
					
						
							|  |  |  |                     end | 
					
						
							|  |  |  |                   end | 
					
						
							|  |  |  |                 end | 
					
						
							|  |  |  |               end | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-22 14:17:58 +00:00
										 |  |  |               Tracker.all.each do |t| | 
					
						
							|  |  |  |                 [new, in_progress, resolved, feedback].each do |os| | 
					
						
							|  |  |  |                   [in_progress, resolved, feedback, closed].each do |ns| | 
					
						
							|  |  |  |                     unless os == ns | 
					
						
							|  |  |  |                       WorkflowTransition. | 
					
						
							|  |  |  |                         create!(:tracker_id => t.id, :role_id => developer.id, | 
					
						
							|  |  |  |                                 :old_status_id => os.id, | 
					
						
							|  |  |  |                                 :new_status_id => ns.id) | 
					
						
							|  |  |  |                     end | 
					
						
							|  |  |  |                   end | 
					
						
							|  |  |  |                 end | 
					
						
							|  |  |  |               end | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-22 14:17:58 +00:00
										 |  |  |               Tracker.all.each do |t| | 
					
						
							|  |  |  |                 [new, in_progress, resolved, feedback].each do |os| | 
					
						
							|  |  |  |                   [closed].each do |ns| | 
					
						
							|  |  |  |                     unless os == ns | 
					
						
							|  |  |  |                       WorkflowTransition. | 
					
						
							|  |  |  |                         create!(:tracker_id => t.id, :role_id => reporter.id, | 
					
						
							|  |  |  |                                 :old_status_id => os.id, :new_status_id => ns.id) | 
					
						
							|  |  |  |                     end | 
					
						
							|  |  |  |                   end | 
					
						
							|  |  |  |                 end | 
					
						
							|  |  |  |                 WorkflowTransition. | 
					
						
							|  |  |  |                   create!(:tracker_id => t.id, :role_id => reporter.id, | 
					
						
							|  |  |  |                           :old_status_id => resolved.id, | 
					
						
							|  |  |  |                           :new_status_id => feedback.id) | 
					
						
							|  |  |  |               end | 
					
						
							| 
									
										
										
										
											2016-12-31 12:53:38 +00:00
										 |  |  |             end | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |             # Enumerations | 
					
						
							| 
									
										
										
										
											2009-12-25 17:13:58 +00:00
										 |  |  |             IssuePriority.create!(:name => l(:default_priority_low), :position => 1) | 
					
						
							|  |  |  |             IssuePriority.create!(:name => l(:default_priority_normal), :position => 2, :is_default => true) | 
					
						
							|  |  |  |             IssuePriority.create!(:name => l(:default_priority_high), :position => 3) | 
					
						
							|  |  |  |             IssuePriority.create!(:name => l(:default_priority_urgent), :position => 4) | 
					
						
							|  |  |  |             IssuePriority.create!(:name => l(:default_priority_immediate), :position => 5) | 
					
						
							| 
									
										
										
										
											2011-09-01 02:05:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-07-26 16:55:40 +00:00
										 |  |  |             DocumentCategory.create!(:name => l(:default_doc_category_user), :position => 1) | 
					
						
							|  |  |  |             DocumentCategory.create!(:name => l(:default_doc_category_tech), :position => 2) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-25 17:13:58 +00:00
										 |  |  |             TimeEntryActivity.create!(:name => l(:default_activity_design), :position => 1) | 
					
						
							|  |  |  |             TimeEntryActivity.create!(:name => l(:default_activity_development), :position => 2) | 
					
						
							| 
									
										
										
										
											2020-04-28 07:10:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # Issue queries | 
					
						
							|  |  |  |             IssueQuery.create!( | 
					
						
							|  |  |  |               :name => l(:label_assigned_to_me_issues), | 
					
						
							|  |  |  |               :filters => | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   'status_id' => {:operator => 'o', :values => ['']}, | 
					
						
							|  |  |  |                   'assigned_to_id' => {:operator => '=', :values => ['me']}, | 
					
						
							|  |  |  |                   'project.status' => {:operator => '=', :values => ['1']} | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |               :sort_criteria => [['priority', 'desc'], ['updated_on', 'desc']], | 
					
						
							|  |  |  |               :visibility => Query::VISIBILITY_PUBLIC | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  |             IssueQuery.create!( | 
					
						
							|  |  |  |               :name => l(:label_reported_issues), | 
					
						
							|  |  |  |               :filters => | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   'status_id' => {:operator => 'o', :values => ['']}, | 
					
						
							|  |  |  |                   'author_id' => {:operator => '=', :values => ['me']}, | 
					
						
							|  |  |  |                   'project.status' => {:operator => '=', :values => ['1']} | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |               :sort_criteria => [['updated_on', 'desc']], | 
					
						
							|  |  |  |               :visibility => Query::VISIBILITY_PUBLIC | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  |             IssueQuery.create!( | 
					
						
							|  |  |  |               :name => l(:label_updated_issues), | 
					
						
							|  |  |  |               :filters => | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   'status_id' => {:operator => 'o', :values => ['']}, | 
					
						
							|  |  |  |                   'updated_by' => {:operator => '=', :values => ['me']}, | 
					
						
							|  |  |  |                   'project.status' => {:operator => '=', :values => ['1']} | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |               :sort_criteria => [['updated_on', 'desc']], | 
					
						
							|  |  |  |               :visibility => Query::VISIBILITY_PUBLIC | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  |             IssueQuery.create!( | 
					
						
							|  |  |  |               :name => l(:label_watched_issues), | 
					
						
							|  |  |  |               :filters => | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   'status_id' => {:operator => 'o', :values => ['']}, | 
					
						
							|  |  |  |                   'watcher_id' => {:operator => '=', :values => ['me']}, | 
					
						
							|  |  |  |                   'project.status' => {:operator => '=', :values => ['1']}, | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |               :sort_criteria => [['updated_on', 'desc']], | 
					
						
							|  |  |  |               :visibility => Query::VISIBILITY_PUBLIC | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Project queries | 
					
						
							|  |  |  |             ProjectQuery.create!( | 
					
						
							|  |  |  |               :name => l(:label_my_projects), | 
					
						
							|  |  |  |               :filters => | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   'status' => {:operator => '=', :values => ['1']}, | 
					
						
							|  |  |  |                   'id' => {:operator => '=', :values => ['mine']} | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |               :visibility => Query::VISIBILITY_PUBLIC | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  |             ProjectQuery.create!( | 
					
						
							|  |  |  |               :name => l(:label_my_bookmarks), | 
					
						
							|  |  |  |               :filters => | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   'status' => {:operator => '=', :values => ['1']}, | 
					
						
							|  |  |  |                   'id' => {:operator => '=', :values => ['bookmarks']} | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |               :visibility => Query::VISIBILITY_PUBLIC | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # Time entry queries | 
					
						
							|  |  |  |             TimeEntryQuery.create!( | 
					
						
							|  |  |  |               :name => l(:label_spent_time), | 
					
						
							|  |  |  |               :filters => | 
					
						
							|  |  |  |                 { | 
					
						
							|  |  |  |                   'spent_on' => {:operator => '*', :values => ['']}, | 
					
						
							|  |  |  |                   'user_id' => {:operator => '=', :values => ['me']} | 
					
						
							|  |  |  |                 }, | 
					
						
							|  |  |  |               :sort_criteria => [['spent_on', 'desc']], | 
					
						
							|  |  |  |               :options => {:totalable_names => [:hours]}, | 
					
						
							|  |  |  |               :visibility => Query::VISIBILITY_PUBLIC | 
					
						
							|  |  |  |             ) | 
					
						
							| 
									
										
										
										
											2008-01-05 11:33:49 +00:00
										 |  |  |           end | 
					
						
							| 
									
										
										
										
											2008-01-04 18:27:05 +00:00
										 |  |  |           true | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |