2023-11-16 20:23:09 +00:00
|
|
|
Redmine::Plugin.register :jobs do
|
|
|
|
name 'Redmine Jobs plugin'
|
|
|
|
author 'T S Vallender'
|
|
|
|
description 'Manage jobs in Redmine'
|
|
|
|
version '0.0.1'
|
|
|
|
url 'http://tsvallender.co.uk'
|
|
|
|
author_url 'http://tsvallender.co.uk'
|
|
|
|
|
|
|
|
menu :project_menu, :jobs, { controller: 'jobs', action: 'index' }, caption: 'Jobs', after: :issues, param: :project_id
|
2023-11-21 13:59:43 +00:00
|
|
|
|
|
|
|
TimeEntry.safe_attributes 'job_id'
|
2023-11-30 19:38:02 +00:00
|
|
|
User.safe_attributes 'time_budget_category_id'
|
2023-11-22 19:44:13 +00:00
|
|
|
|
|
|
|
Rails.application.config.before_initialize do
|
|
|
|
Rails.logger.info "Patch Jobs"
|
|
|
|
TimeEntryQuery.send(:include, TimeEntryQueryPatch)
|
|
|
|
TimeEntry.send(:include, TimeEntryPatch)
|
2023-11-27 14:20:28 +00:00
|
|
|
Project.send(:include, ProjectPatch)
|
2024-01-16 13:10:16 +00:00
|
|
|
Redmine::Helpers::TimeReport.send(:include, TimeReportHelperPatch)
|
2023-11-22 19:44:13 +00:00
|
|
|
end
|
2023-12-04 13:44:59 +00:00
|
|
|
|
|
|
|
project_module :jobs do
|
|
|
|
permission :jobs, { jobs: [:index, :show, :new, :create, :edit, :update, :destroy] }, public: false
|
|
|
|
end
|
2023-11-16 20:23:09 +00:00
|
|
|
end
|