Redmine-Jobs/init.rb

22 lines
765 B
Ruby
Raw Normal View History

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'
2023-11-26 20:25:27 +00:00
permission :jobs, { jobs: [:index, :show, :new, :create, :edit, :update, :destroy] }, public: false
2023-11-16 20:23:09 +00:00
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'
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)
Project.send(:include, ProjectPatch)
2023-11-22 19:44:13 +00:00
end
2023-11-16 20:23:09 +00:00
end