Skip to content

Commit f66b0dd

Browse files
committed
Merge pull request #79 from nutso/develop
merge to v1.5
2 parents 2a41fee + d65ec9e commit f66b0dd

File tree

6 files changed

+27
-9
lines changed

6 files changed

+27
-9
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Follow standard Redmine plugin installation -- (barely) modified from http://www
2828
1. Copy or clone the plugin directory into #{RAILS_ROOT}/plugins/recurring_tasks -- note the folder name 'recurring_tasks' must be verbatim.
2929

3030
e.g. git clone https://github.com/nutso/redmine-plugin-recurring-tasks.git recurring_tasks
31+
32+
NOTE! This particular clone will tie you to the master branch, which is not recommended for production systems (faster updates and features but less well-tested). Recommend using a specific version of the plugin which will provide a more stable baseline.
3133

3234
2. Rake the database migration (make a db backup before)
3335

@@ -39,13 +41,17 @@ You should now be able to see the plugin list in Administration -> Plugins.
3941

4042
## Configuration
4143
42-
1. Set the check for recurrence via Crontab.
44+
1. Set the check for recurrence via Crontab or similar.
4345

44-
Crontab example (running the check for recurrence every 6 hours on the 15s) -- replace {path_to_redmine} with your actual path, e.g. /var/www/redmine:
46+
"Pure" crontab example (running the check for recurrence every 6 hours on the 15s) -- replace {path_to_redmine} with your actual path, e.g. /var/www/redmine:
4547
```bash
4648
15 */4 * * * /bin/sh "cd {path_to_redmine} && bundle exec rake RAILS_ENV=production redmine:recur_tasks" >> log/cron_rake.log 2>&1
4749
```
4850

51+
You can also use e.g. cron.daily or cron.hourly to avoid having to figure out the precise cron syntax for the schedule; Ruby gems Rufus Scheduler and Whenever can also be used; the key point is that something needs to call recur_tasks on a regular basis.
52+
53+
More information on Rufus Scheduler config at [#72](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/72)
54+
4955
2. Decide which role(s) should have the ability to view/add/edit/delete issue recurrence and configure accordingly in Redmine's permission manager (Administration > Roles and Permissions)
5056
* View issue recurrence
5157
* Add issue recurrence

ReleaseNotes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
## Features Requested
44

55
* Option to 'predict' recurrences on calendar -- perhaps ghost the projected recurrences in ([#38](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/38))
6-
* Option to re-open recurring issue instead of creating a new issue, so all comments/information are stored in a single place ([#45](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/45))
6+
* Option to re-open recurring issue instead of creating a new issue, so all comments/information are stored in a single place ([#45](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/45)); ([#45](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/74))
77
* Option to enable recurrence on a per-project basis ([#36](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/36))
8+
* Configurable option to hide the "Recurring issues" link in the admin menu ([#54](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/54))
89

910
## Known Issues
1011

@@ -13,12 +14,15 @@
1314

1415
## Next Version (Develop Branch)
1516

17+
## Version 1.5.0 (13 June 2015)
18+
1619
* Backwards-compatibility to Redmine 2.2 by testing if issue.closed_on? method exists ([#49](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/36))
1720
* Redmine 3.0 support contributed by @lammel ([#65](https://github.com/nutso/redmine-plugin-recurring-tasks/pull/65))
1821
* French translation updated by @jbeauvois ([#66](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/66)
1922
* Better documentation of plugin permissions
2023
* Reversible migrations so can uninstall fully ([#53](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/53))
2124
* Highlighting to user that adding recurrence via issues page is the best way ([#52](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/52))
25+
* Stable support for both Redmine 2.x and Redmine 3.x ([#71](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/71)); ([#67](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/67)) and ([#69](https://github.com/nutso/redmine-plugin-recurring-tasks/issues/69))
2226

2327
## Version 1.4.0 (07 Sep 2014)
2428

app/models/recurring_task.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,13 @@ def recur_issue_if_needed!
249249
new_issue.due_date = next_scheduled_recurrence #41 previous_date_for_recurrence + recurrence_pattern
250250
new_issue.start_date = new_issue.due_date
251251
new_issue.done_ratio = 0
252-
new_issue.status = issue.tracker.default_status # issue status is NOT automatically new, default is whatever the default status for new issues is
252+
if issue.tracker.respond_to?(:default_status)
253+
# Redmine 3
254+
new_issue.status = issue.tracker.default_status # issue status is NOT automatically new, default is whatever the default status for new issues is
255+
else
256+
# Redmine 2
257+
new_issue.status = IssueStatus.default
258+
end
253259
new_issue.save!
254260
puts "Recurring #{issue.id}: #{issue.subj_date}, created #{new_issue.id}: #{new_issue.subj_date}"
255261

config/routes.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
match 'projects/:project_id/recurring_tasks/create', :to => 'recurring_tasks#create', :via => 'post'
1010
match 'projects/:project_id/recurring_tasks/:id', :to => 'recurring_tasks#show', :as => :recurring_task, :via => 'get'
1111
match 'projects/:project_id/recurring_tasks/:id/edit', :to => 'recurring_tasks#edit', :as => :edit_recurring_task, :via => 'get'
12-
match 'projects/:project_id/recurring_tasks/:id/update', :to => 'recurring_tasks#update', :via => [:get, :post, :patch]
13-
match 'projects/:project_id/recurring_tasks/:id/destroy', :to => 'recurring_tasks#destroy', :as => :destroy_recurring_task, :via => [:post, :delete]
12+
match 'projects/:project_id/recurring_tasks/:id/update', :to => 'recurring_tasks#update', :via => [:put, :patch]
13+
match 'projects/:project_id/recurring_tasks/:id/destroy', :to => 'recurring_tasks#destroy', :as => :destroy_recurring_task, :via => [:delete]

db/migrate/004_set_default_modifier_for_existing_monthly_issues.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# default modifier for existing issues. Otherwise validation error will occur.
33
class SetDefaultModifierForExistingMonthlyIssues < ActiveRecord::Migration
44
def up
5-
RecurringTask.find_all_by_interval_unit(RecurringTask::INTERVAL_MONTH).each do |rt|
5+
# find_all_by... deprecated for Rails 4/Redmine 3
6+
# RecurringTask.find_all_by_interval_unit(RecurringTask::INTERVAL_MONTH).each do |rt|
7+
RecurringTask.where(:interval_unit => RecurringTask::INTERVAL_MONTH).each do |rt|
68
begin
79
logger.info "Migrating task ##{rt.id}, interval unit #{rt.interval_unit}"
810
rt.interval_modifier = RecurringTask::MONTH_MODIFIER_DAY_FROM_FIRST

init.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
author 'Teresa N.'
1010
author_url 'https://github.com/nutso/'
1111
url 'https://github.com/nutso/redmine-plugin-recurring-tasks'
12-
description 'Allows you to set a task to recur on a regular schedule, or when marked complete, regenerate a new task due in the future. Plugin is based -- very loosely -- on the periodic tasks plugin published by Tanguy de Courson'
13-
version '1.4.0'
12+
description 'Allows you to set a task to recur on a regular schedule, or when marked complete, regenerate a new task due in the future. Supports Redmine 2.x and 3.x'
13+
version '1.5.0'
1414

1515
Redmine::MenuManager.map :top_menu do |menu|
1616
menu.push :recurring_tasks, { :controller => 'recurring_tasks', :action => 'index' }, :caption => :label_recurring_tasks, :if => Proc.new { User.current.admin? }

0 commit comments

Comments
 (0)