Giter VIP home page Giter VIP logo

redmine-periodic-task's Introduction

Build Status

Redmine periodictask

In some projects there are tasks that need to be assigned on a schedule. Such as check the ssl registration once per year or run security checks every 3 months

After you installed the plugin you can add it as a module to a project that already exists or activate it as default module for new projects. On each project it will add a new tab named "Periodic Task" - just go there to add your tasks.

Redmine version support

Support for old redmine versions has been dropped. If you are using an old version, you can use the corresponding branch according to the following table. If you cannot migrate to a newer version and still need support, you can hire me to do it. Just contact me with the details.

git branch redmine version support
1.x 2.x 3.x 4.x 5.x
main ? ? ? ?
redmine4 ? ? 🚫
redmine2 🚫 🚫 🚫

To use redmine2 branch, when cloning use -b redmine2 like this git clone -b redmine2 http://github.com:/jperelli/Redmine-Periodic-Task.git plugins/periodictask

Installation

cd /usr/local/share/redmine
git clone http://github.com:/jperelli/Redmine-Periodic-Task.git plugins/periodictask
bundle install
bundle exec rake redmine:plugins:migrate NAME=periodictask RAILS_ENV=production
apache2ctl graceful

Upgrade

cd /usr/local/share/redmine/plugins/periodictask
git pull
bundle install
bundle exec rake redmine:plugins:migrate NAME=periodictask RAILS_ENV=production
apache2ctl graceful

Uninstallation

cd /usr/local/share/redmine
bundle exec rake redmine:plugins:migrate NAME=periodictask VERSION=0 RAILS_ENV=production
rm -rf plugins/periodictask
apache2ctl graceful

Configuration

Go to your console and run which bundle. In my case, that command returned /usr/local/rvm/gems/ruby-2.1.0/bin/bundle. Use that to configure cron like this

As root do crontab -e and add this to the last line

0 1 * * * cd /var/www/<redminedir>; /usr/local/rvm/gems/ruby-2.1.0/bin/bundle exec rake redmine:check_periodictasks RAILS_ENV="production"

You can also make it run once per hour

0 * * * * cd /var/www/<redminedir>; /usr/local/rvm/gems/ruby-2.1.0/bin/bundle exec rake redmine:check_periodictasks RAILS_ENV="production"

Or even every 10 minutes

*/10 * * * * cd /var/www/<redminedir>; /usr/local/rvm/gems/ruby-2.1.0/bin/bundle exec rake redmine:check_periodictasks RAILS_ENV="production"

If you want to substitute variables **DAY**, **WEEK**, **MONTH**, **MONTHNAME**, **YEAR**, **PREVIOUS_MONTHNAME**, **PREVIOUS_MONTH** with a localized version in your laguage please add LOCALE="de" (available are de, en, ja, tr, ru, tr, zh) to cronjob like this

0 * * * * cd /var/www/<redminedir>; /usr/local/rvm/gems/ruby-2.1.0/bin/bundle exec rake redmine:check_periodictasks RAILS_ENV="production" LOCALE="de"

Plugins supported

redmine-periodictask supports redminecrm checklist PRO to be used when creating a periodic task.

Development

Start with docker compose up --build and wait until it finishes. In other console do ./provision.sh, this will install initial data for it to be easier to develop.

Then go to http://127.0.0.1:3000/ and login with

user: admin
pass: admin

You should have a project named project1 with periodictask installed

In order to run the "cron checker": docker compose exec redmine bundle exec rake redmine:check_periodictasks RAILS_ENV=development

Authors

Top Contributors

License

MIT

redmine-periodic-task's People

Contributors

alexandermeindl avatar atopcu avatar cforce avatar cpcerrato avatar csfreak avatar davidegiacometti avatar jperelli avatar mape2k avatar marczona avatar mc906 avatar msysh avatar myneid avatar oleg-kolzhanov avatar s-andy avatar s2chmich avatar tatsuyaueda avatar tomora avatar yzzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redmine-periodic-task's Issues

periodic task configuration not understand

after add plugin on redmine, i add that module on my project.
and then it is showing as new tab like periodic task.
after then when i click on that tab when i create new task,
i dont understand how and what i need to configure on that tab.
means what is came on subject and other fields on that tab.

thanks

rake : 'development' database is not configured. Available: ["production"]

After installing Redmine Periodic Tasks plugin, I can't use rake. For example, I needed to regenerate secret token :

redmine@kabuki:~/redmine-git$ bundle exec rake generate_secret_token
rake aborted!
ActiveRecord::AdapterNotSpecified: 'development' database is not configured. Available: ["production"]
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/connection_specification.rb:211:in `resolve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/connection_specification.rb:139:in `resolve'
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec'
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/connection_handling.rb:50:in `establish_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `each'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/base.rb:315:in `<module:ActiveRecord>'
/var/lib/gems/2.1.0/gems/activerecord-4.2.8/lib/active_record/base.rb:26:in `<top (required)>'
/usr/local/share/redmine/redmine-git/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/local/share/redmine/redmine-git/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/local/share/redmine/redmine-git/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/local/share/redmine/redmine-git/config/initializers/00-core_plugins.rb:2:in `each'
/usr/local/share/redmine/redmine-git/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `block in load'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/lib/gems/2.1.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:651:in `load_config_initializer'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:615:in `each'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:44:in `each'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:352:in `initialize!'
/usr/local/share/redmine/redmine-git/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/var/lib/gems/2.1.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/local/share/redmine/redmine-git/plugins/periodic_task/lib/tasks/periodictask.rake:7:in `<top (required)>'
/usr/local/share/redmine/redmine-git/lib/tasks/redmine.rake:194:in `load'
/usr/local/share/redmine/redmine-git/lib/tasks/redmine.rake:194:in `block in <top (required)>'
/usr/local/share/redmine/redmine-git/lib/tasks/redmine.rake:194:in `each'
/usr/local/share/redmine/redmine-git/lib/tasks/redmine.rake:194:in `<top (required)>'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:658:in `load'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:658:in `block in run_tasks_blocks'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:658:in `each'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:658:in `run_tasks_blocks'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/application.rb:452:in `run_tasks_blocks'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/engine.rb:453:in `load_tasks'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `public_send'
/var/lib/gems/2.1.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `method_missing'
/usr/local/share/redmine/redmine-git/Rakefile:7:in `<top (required)>'
/var/lib/gems/2.1.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

Polish translation

Hello,
I'm attaching polish translation. Can you tell me if the title of module can be also translated?

pl.zip

DAY variable

This is what I can see when creating a new reoccuring reminder:
Possible variables are WEEK (01-53), MONTH (01-12), MONTHNAME (January - December), YEAR (YYYY)

Is there any chance to add suport for DAY ? I would like to add day and month into the subject.

Periodic task not working if field next run date was left empty

Cronjob is working hourly. Already tested on other tasks and it was OK. But if i make a task with empty next run field it seems to start never!?
As seen in the table the data points to "NULL". My expectation was that in this case the first task was set in the next hour (because of hourly cronjob). But nothing happens.

Data out of mysql db table periodictask:
| id | project_id | tracker_id | assigned_to_id | author_id | subject | interval_number | interval_units | last_assigned_date | next_run_date | set_start_date | due_date_number | due_date_units | description | issue_category_id |
| 1 | 5 | 2 | 7 | 7 | test DAY | 1 | day | NULL | NULL | 1 | 1 | week | sfdgfdsg | NULL |

So what's the failure?
Thanks!

Does not send email

Unfortunatelly, when new issue is created, the user is not notified by email. Is this something that can be fixed?

Thanks a lot, great plugin btw!

Time of next run shifts 1 hour ahead

Periodic Task plugin shifts each time next run time on our to the future.
I think it can be connected with local time (we are at GMT+1, Prague).

Thanks for reviewing!

image

image

Error when run rake redmine:check_periodictasks RAILS_ENV="production"

Hi,

See below my environment:
Environment:
Redmine version 2.3.1.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.13
Environment production
Database adapter MySQL
Redmine plugins:
periodictask 2.0.0

And error:
root@redmine:/home/redmine/redmine/public# rake redmine:check_periodictasks RAILS_ENV="production" --trace
(in /home/redmine/redmine)
** Invoke redmine:check_periodictasks (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:check_periodictasks
rake aborted!
Symbol as array index
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/attribute_assignment.rb:74:in []' /var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/attribute_assignment.rb:74:inassign_attributes_without_project_and_tracker_first'
/home/redmine/redmine/app/models/issue.rb:336:in send' /home/redmine/redmine/app/models/issue.rb:336:inassign_attributes'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/base.rb:498:in initialize' /home/redmine/redmine/app/models/issue.rb:149:ininitialize_without_redshares'
/home/redmine/redmine/plugins/redshares/lib/redshares/patches/issue_patch.rb:41:in initialize' /home/redmine/redmine/plugins/periodictask/lib/scheduled_tasks_checker.rb:5:innew'
/home/redmine/redmine/plugins/periodictask/lib/scheduled_tasks_checker.rb:5:in checktasks!' /home/redmine/redmine/plugins/periodictask/lib/scheduled_tasks_checker.rb:3:ineach'
/home/redmine/redmine/plugins/periodictask/lib/scheduled_tasks_checker.rb:3:in checktasks!' /home/redmine/redmine/plugins/periodictask/lib/tasks/periodictask.rake:11 /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:incall'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in execute' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:ineach'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in execute' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/task.rb:184:ininvoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in synchronize' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/task.rb:177:ininvoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/task.rb:170:in invoke' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:143:ininvoke_task'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in top_level' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:ineach'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in top_level' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:110:inrun_with_threads'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:95:in top_level' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:73:inrun'
/var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:160:in standard_exception_handling' /var/lib/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:70:inrun'
/var/lib/gems/1.8/gems/rake-10.0.4/bin/rake:33
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Tasks: TOP => redmine:check_periodictasks
assigning test

I've installed plugin and it was installed OK without any error. But I can't use crontab because of this error.
As I understood from your explanation on github I need first to enter to my public directory (I put the same dir that I use in /etc/apache2/sites-enabled/redmine file) and then to run rake. And as you see I received error.
My crontab:
0 * * * * cd /home/redmine/redmine/public; rake redmine:check_periodictasks RAILS_ENV="production"
Can you advice?

Thanks in advance,
Roman

[Request] Additional Schedule Methods?

Would it be possible to adjust the schedule to be able to calculate and run on the 1st, 2nd, 3rd, 4th, ect.. day of the week? For example, a task the runs on the 3rd Wednesday of the Month.

Crontab issue

Here is the error message when running the command cd /usr/share/redmine && rake reminder:exec RAILS_ENV="production"

I'm using Redmine 3.1.0.

rake aborted!
Don't know how to build task 'reminder:exec'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
root@ns300122:/usr/share/redmine# rake redmine:check_periodictasks RAILS_ENV="production"
rake aborted!
uninitialized constant ScheduledTasksChecker::Periodictask
/usr/share/redmine-3.1.0/plugins/Redmine-Periodic-Task/lib/scheduled_tasks_checker.rb:3:in `checktasks!'
/usr/share/redmine-3.1.0/plugins/Redmine-Periodic-Task/lib/tasks/periodictask.rake:11:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:check_periodictasks

Set watchers in a periodic task

Being able to set at least one watcher will be useful to notice some users about task creation and its updates.

If someone could guide me a bit how that could be done, I will try to do it by myself.

Russian localization

Hi!
Please add Russian localization. for example that
ru:
field_interval_number: Interval number
field_interval_unit: Interval unit
field_tracker: Трекер
field_category: Category
label_assigned_to_user: Назначена
no_members_in_project: В этом проекте нет участников
no_categories_in_project: В этом проекте нет категорий
label_subject: Тема
label_next_run_date: Дата следующего запуска (yyyy-mm-dd hh:mm:ss)
label_edit_periodic_task: Редактировать периодическую задачу
label_new_periodic_task: Новая периодическая задача
label_no_members_in_project: В этом проекте нет участников
label_no_categories_in_project: В этом проекте нет категорий
label_periodic_tasks: Периодические Задачи
label_create_periodic_task: Создать
label_save_periodic_task: Сохранить
label_scheduled_tasks: Запланированные задачи
label_no_project: No project ID supplied
label_remove_periodic_task: Удалить периодическую задачу
label_interval: Интервал
label_set_start_date: Устанвить дату начала
label_due_date: Плановая дата через
label_description: Описание
label_issue_category: Категория задачи
label_unit_day: дней
label_unit_week: неделя
label_unit_month: месяц
label_unit_year: год(лет)
flash_task_created: Периодическа задача создана
flash_task_saved: Периодическа задача сохранена
subject_variables: Возможные переменные WEEK (01-53), MONTH (01-12), MONTHNAME (января - декабря), PMONTHNAME передыдущий месяц, YEAR (YYYY)

rake aborted! ArgumentError: wrong number of arguments (1 for 0)

when i try to:
cd /var/www/; rake redmine:check_periodictasks RAILS_ENV="production"

i get the error:

rake aborted!
ArgumentError: wrong number of arguments (1 for 0)
/usr/local/rvm/gems/ruby-2.1.0/gems/activerecord-4.2.1/lib/active_record/scoping/named.rb:24:in `all'
/var/www/.............../plugins/periodictask/lib/scheduled_tasks_checker.rb:3:in `checktasks!'
/var/www/.............../plugins/periodictask/lib/tasks/periodictask.rake:11:in `block (2 levels) in '
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `'
Tasks: TOP => redmine:check_periodictasks

README.md - wrong cron example

Hello,
this is wrong :

Or even every 10 minutes
0/10 * * * * cd /var/www/; rake redmine:check_periodictasks RAILS_ENV="production"

should be :
*/10 * * * * cd /var/www/; rake redmine:check_periodictasks RAILS_ENV="production"

Max Devaine

Interval without weekend days

Hi, is there any chance to set interval without weekend days, please? For e.g. each 3 days but if that is saturday or sunday, then take monday and tuesday instead. That would help me a lot. Thanks.

Suddenly rake aborted

I have just installed this plugin, I did some testing with the cron rake task and all seemed OK. Now 2 days later it seems to fail (could have been right away, not sure)

root@linux:/opt/bitnami/apps/redmine/htdocs# sudo rake redmine:check_periodictasks RAILS_ENV="production"
assigning test periodic task
rake aborted!
FloatDomainError: Infinity
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:33:in `ceil'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:33:in `block in checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:3:in `checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/tasks/periodictask.rake:11:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine:check_periodictasks
(See full trace by running task with --trace)

Error on delete periodic tasks

When I hit the "delete" button I get an error message "page not found"

I think I located the problem: config/routes.rb contains "delete" as method for action destroy, but app/views/periodictask/index.html.erb uses "post" as method.

my fix to solve the problem: change method in app/views/periodictask/index.html.erb to delete

# diff ~/periodictask-unchanged/app/views/periodictask/index.html.erb  index.html.erb 
30c30
<   <%= link_to l(:button_delete), {:controller => 'periodictask', :action => 'destroy', :id => a.id, :project_id => @project}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>

---
>   <%= link_to l(:button_delete), {:controller => 'periodictask', :action => 'destroy', :id => a.id, :project_id => @project}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>

Edit interval number don't work

hi,

I try to update a value to this field it don't work , the value stay to 1.
When i look up the file _form.html.erb , i see it's normal

<%= label(:periodictask, :interval_number, l(:label_interval)) %><%= f.number_field :interval_number, :value => 1, :required => true, :min => 1 %> <%= select 'periodictask', 'interval_units', Periodictask::INTERVAL_UNITS %>

i've changed it to

<%= label(:periodictask, :interval_number, l(:label_interval)) %><%= f.number_field :interval_number, :value => @periodictask.interval_number||=, :required => true, :min => 1 %> <%= select 'periodictask', 'interval_units', Periodictask::INTERVAL_UNITS %>

Repo is forked her:
coreye@d49dd5d

and the correction is done .

Thanks

The plugin does not check, if the project still exists

When a project with periodic task is removed, its tasks are not. This causes crash of the rake task at the line:

Here, #save executes validations and validations attempt to access the project, which does not exist any longer. The exact error message is:

rake aborted!
NoMethodError: undefined method `assignable_users' for nil:NilClass
/opt/bitnami/apps/redmine/htdocs/app/models/issue.rb:928:in `assignable_users'
/opt/bitnami/apps/redmine/htdocs/app/models/issue.rb:729:in `validate_issue'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:34:in `block in checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/scheduled_tasks_checker.rb:4:in `checktasks!'
/opt/bitnami/apps/redmine/htdocs/plugins/periodictask/lib/tasks/periodictask.rake:11:in `block (2 levels) in <top (required)>'
Tasks: TOP => redmine:check_periodictasks
(See full trace by running task with --trace)

I believe, the plugin should be fixed, so that periodic tasks are removed with the project.

potential issue when field description is empty/null

when i upgraded my old version, the periodc-task dumped in cron-mode.

Cron-cmd: :

--- cd /opt/redmine/redmine-3.3.3; rake redmine:check_periodictasks RAILS_ENV=production

--- rake aborted!
TypeError: can't dup NilClass
/opt/redmine/redmine-3.3.3/plugins/periodictask/lib/scheduled_tasks_checker.rb:11:in dup' /opt/redmine/redmine-3.3.3/plugins/periodictask/lib/scheduled_tasks_checker.rb:11:in block in checktasks!'
/var/lib/gems/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in each' /var/lib/gems/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in each'
/opt/redmine/redmine-3.3.3/plugins/periodictask/lib/scheduled_tasks_checker.rb:4:in checktasks!' /opt/redmine/redmine-3.3.3/plugins/periodictask/lib/tasks/periodictask.rake:11:in block (2 levels) in <top (required)>'
/var/lib/gems/2.1.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:check_periodictasks
(See full trace by running task with --trace)

--- content of DB-table ---

--- MariaDB [redmine]> select description from periodictasks;
+-------------+
| description |
+-------------+
| | <- some space/blank
| NULL | <-some null
| NULL |
...

-- fixed with patch --
( now worksforme)
---a/lib/scheduled_tasks_checker.rb
+++ b/lib/scheduled_tasks_checker.rb
@@ -8,7 +8,8 @@ class ScheduledTasksChecker
# Copy subject and description and replace variables
subject = task.subject.dup
- description = task.description.dup
+ description = (task.description || "").dup
subject.gsub!('**DAY**', now.strftime("%d"))
subject.gsub!('**WEEK**', now.strftime("%W"))
subject.gsub!('**MONTH**', now.strftime("%m"))

migration not working for postgres

migration is aborting:

rake redmine:plugins:migrate RAILS_ENV=production
(in /opt/redmine-2.3)
Migrating periodictask (Redmine Periodictask plugin)...
==  AddDateAndDescriptionToPeriodictasks: migrating ===========================
-- add_column(:periodictasks, :set_start_date, :boolean, {:null=>false, :default=>false})
   -> 0.1850s
-- add_column(:periodictasks, :due_date_number, :integer, {:null=>true, :default=>nil})
   -> 0.0014s
-- add_column(:periodictasks, :due_date_units, :string, {:null=>false, :default=>nil})
rake aborted!
An error has occurred, this and all later migrations canceled:

PG::NotNullViolation: ERROR:  column "due_date_units" contains null values
: ALTER TABLE "periodictasks" ADD COLUMN "due_date_units" character varying(255) NOT NULL/var/lib/gems/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in `exec'

Fix:

> git diff
diff --git a/db/migrate/20140722185522_add_date_and_description_to_periodictasks.rb b/db/migrate/20140722185522_add_date_and_description_to_periodictasks.rb
index 20920af..433bb74 100644
--- a/db/migrate/20140722185522_add_date_and_description_to_periodictasks.rb
+++ b/db/migrate/20140722185522_add_date_and_description_to_periodictasks.rb
@@ -2,7 +2,7 @@ class AddDateAndDescriptionToPeriodictasks < ActiveRecord::Migration
   def self.up
     add_column :periodictasks, :set_start_date, :boolean, :null => false, :default => false
     add_column :periodictasks, :due_date_number, :integer, :null => true, :default => nil
-    add_column :periodictasks, :due_date_units, :string, :null => false
+    add_column :periodictasks, :due_date_units, :string, :null => true
     add_column :periodictasks, :description, :text, :null => true
   end

Previous month and variables in description

Hi!
Please add new variable PMONTHNAME - previous month and replacing variables in description.
I have implemented it in a file / lib / scheduled_tasks_checker.rb
# replace variables (set locale from shell)
I18n.locale = ENV['LOCALE'] || I18n.default_locale
task.subject.gsub!('WEEK', Time.now.strftime("%W"))
task.subject.gsub!('MONTH', Time.now.strftime("%m"))
task.subject.gsub!('MONTHNAME', I18n.localize(Time.now, :format => "%B"))
task.subject.gsub!('YEAR', Time.now.strftime("%Y"))
task.subject.gsub!('PMONTHNAME', I18n.localize(Time.now - 2592000, :format => "%B"))
task.description.gsub!('WEEK', Time.now.strftime("%W"))
task.description.gsub!('MONTH', Time.now.strftime("%m"))
task.description.gsub!('MONTHNAME', I18n.localize(Time.now, :format => "%B"))
task.description.gsub!('YEAR', Time.now.strftime("%Y"))
task.description.gsub!('PMONTHNAME', I18n.localize(Time.now - 2592000, :format => "%B"))

Next run date constantly increasing.

Hello,
I'm in GMT+1 timezone. When I set next run time to 6am task is created at 7 am in my timezone as expected BUT next runtime is automatically is 7am UTC so next time it will be 8am in my timezone ...
I tried to use a tip from #25 but it makes a gap even bigger.
I have cron set to run once a day at 7 am.

Using timezones other than UTC

It would be great if we could set a default timezone other than UTC for this plugin. I'm having to constantly remind people that when creating a periodic tasks that they need to include -7 (MST) when filling out the Next run date.

I believe an improvement to this plugin would be to use the same timezone as the system, or allow the timezone to be set in the plugin.

can't install

git clone http://github.com:/jperelli/Redmine-Periodic-Task.git plugins/periodictask
Cloning into 'plugins/periodictask'...
remote: Counting objects: 410, done.
remote: Total 410 (delta 0), reused 0 (delta 0), pack-reused 410
Receiving objects: 100% (410/410), 57.65 KiB | 0 bytes/s, done.
Resolving deltas: 100% (163/163), done.

/home/support/download/redmine/redmine-3.2.0/bin/rake redmine:plugins:migrate NAME=periodictask RAILS_ENV=production
Please configure your config/database.yml first
(in /var/www/redmine)
rake aborted!
NoMethodError: undefined method last_comment' for #<Rake::Application:0x0000000241ac88> /usr/local/share/gems/gems/yard-0.8.7.6/lib/yard/rake/yardoc_task.rb:69:in define'
/usr/local/share/gems/gems/yard-0.8.7.6/lib/yard/rake/yardoc_task.rb:61:in initialize' /var/www/redmine/lib/tasks/yardoc.rake:4:in new'
/var/www/redmine/lib/tasks/yardoc.rake:4:in <top (required)>' /usr/local/share/gems/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in load'
/usr/local/share/gems/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in block in load' /usr/local/share/gems/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in load_dependency'
/usr/local/share/gems/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in load' /usr/local/share/gems/gems/railties-4.2.5/lib/rails/engine.rb:658:in block in run_tasks_blocks'
/usr/local/share/gems/gems/railties-4.2.5/lib/rails/engine.rb:658:in each' /usr/local/share/gems/gems/railties-4.2.5/lib/rails/engine.rb:658:in run_tasks_blocks'
/usr/local/share/gems/gems/railties-4.2.5/lib/rails/application.rb:452:in run_tasks_blocks' /usr/local/share/gems/gems/railties-4.2.5/lib/rails/engine.rb:453:in load_tasks'
/usr/local/share/gems/gems/railties-4.2.5/lib/rails/railtie.rb:194:in public_send' /usr/local/share/gems/gems/railties-4.2.5/lib/rails/railtie.rb:194:in method_missing'
/var/www/redmine/Rakefile:7:in `<top (required)>'
(See full trace by running task with --trace)

The database.yml is already configured.

Redmine 3.2.0

Any help please?

Thanks.-

find_all_by_project_id not defined

Installing the plugin in redmine2 we found that the method find_all_by_project_id called in plugins/periodictask/app/controllers/periodictask_controller.rb is not defned. Instead we have managed to make it function replacing this line:

@tasks = Periodictask.find_all_by_project_id(@project[:id])

For this one:

@tasks = Periodictask.where(project_id: @project)

Mysql2::Error: Incorrect string value:

) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 |

ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xD0\xA2\xD0\xB5\xD1\x81...' for column 'subject' at row 1: INSERT INTO periodictasks (author_id, project_id, subject, assigned_to_id, interval_number, interval_units, tracker_id, set_start_date, due_date_units, description) VALUES (4, 58, 'Тестовая задача **MONTH**', 4, 1, 'day', 3, 1, 'day', '**MONTH**')): plugins/periodictask/app/controllers/periodictask_controller.rb:26:in create'
lib/redmine/sudo_mode.rb:63:in sudo_mode'

clicking "period task" menu gives Page not found

I installed periodictask 3.2.1 on
Environment:
Redmine version 3.4.2.stable
Ruby version 2.2.1-p85 (2015-02-26) [x86_64-linux]
Rails version 4.2.8
Environment production
Database adapter Mysql2

But when i activate it on a project and i click on the menu periodic task it takes me to an url that does not exists

Page not found
The page you were trying to access doesn't exist or has been removed.
Back

What am i doing wrong?

Set priority to new periodic task

Is there any chance how to set priority to new periodic task? E.g. we have it for time log updates and new builds, but it is always created with the default priority (= normal). Thanks.

Redmine 3.1 - uninitialized constant ScheduledTasksChecker::Periodictask

Trying to install this plugin to redmine 3.1.1, and encounter this error while trying to execute cronjob:

** Invoke redmine:check_periodictasks (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:check_periodictasks
rake aborted!
NameError: uninitialized constant ScheduledTasksChecker::Periodictask
/data/redmine/plugins/Redmine-Periodic-Task/lib/scheduled_tasks_checker.rb:3:in `checktasks!'
/data/redmine/plugins/Redmine-Periodic-Task/lib/tasks/periodictask.rake:11:in `block (2 levels) in <top (required)>'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/data/.rbenv/versions/2.1.7/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/data/.rbenv/versions/2.1.7/lib/ruby/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/data/.rbenv/versions/2.1.7/bin/rake:23:in `load'
/data/.rbenv/versions/2.1.7/bin/rake:23:in `<main>'
Tasks: TOP => redmine:check_periodictasks

SystemStackError: stack level too deep

Hi!
My redmine 3.2.0 stable, and so:
root@redmine:/usr/share/redmine/plugins/periodictask# rake redmine:plugins:migrate NAME=periodictask RAILS_ENV=production
(in /usr/share/redmine)
rake aborted!
SystemStackError: stack level too deep
/var/lib/gems/1.9.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:244
(See full trace by running task with --trace)

Whats wrong?

[solved] migrating from an older version

(run into this error, started writing an issue, found the solution and document it now here )
I used periodic_task before, on a 2.1 redmine. ( https://github.com/jperelli/Redmine-Periodic-Task/tree/redmine2 )

.. Run into several issues, especially the CRON job did nor work.

/usr/local/bin/bundle exec rake redmine:check_periodictasks RAILS_ENV="production" --trace
** Invoke redmine:check_periodictasks (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:check_periodictasks
rake aborted!
NoMethodError: undefined method 'issue_category_id' for #<Periodictask:0x00000008a39898>
/var/lib/gems/2.1.0/gems/activemodel-4.2.7.1/lib/active_model/attribute_methods.rb:433:in 'method_missing'
/opt/redmine/redmine-3.3.3/plugins/periodictask/lib/scheduled_tasks_checker.rb:27:in 'block in checktasks!'
/var/lib/gems/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in 'each'
/var/lib/gems/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in 'each'

found, i had to do an upgrade of the DB-structure:

/usr/local/bin/bundle exec rake db:migrate_plugins RAILS_ENV=production
(in /opt/redmine/redmine-3.3.3)
Migrating periodictask (Redmine Periodictask plugin)...
== 20151002140303 AddCategoryToPeriodictasks: migrating =======================
-- add_column(:periodictasks, :issue_category_id, :integer, {:null=>true, :default=>nil})
-> 0.0951s
== 20151002140303 AddCategoryToPeriodictasks: migrated (0.0954s) ==============

"Page not found" error on project/<name>/periodictask

Redmine 3.0.4.stable
Rails 4.2.3
Periodictask v3.1.1 (git checkout v3.1.1).
Periodictask from master gives the same error.

Migration was ok, redmine was restarted after migration.

Stacktrace from production.log:

Started GET "/projects/admin/periodictask" for 127.0.0.1 at 2015-11-02 15:05:43 +0300

ActionController::RoutingError (uninitialized constant PeriodictaskController):
  activesupport (4.2.3) lib/active_support/inflector/methods.rb:261:in `const_get'
  activesupport (4.2.3) lib/active_support/inflector/methods.rb:261:in `block in constantize'
  activesupport (4.2.3) lib/active_support/inflector/methods.rb:259:in `each'
  activesupport (4.2.3) lib/active_support/inflector/methods.rb:259:in `inject'
  activesupport (4.2.3) lib/active_support/inflector/methods.rb:259:in `constantize'
  actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:72:in `controller_reference'
  actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:62:in `controller'
  actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:41:in `serve'
  actionpack (4.2.3) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.3) lib/action_dispatch/journey/router.rb:30:in `each'
  actionpack (4.2.3) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.3) lib/action_dispatch/routing/route_set.rb:821:in `call'
  rack-openid (1.4.2) lib/rack/openid.rb:98:in `call'
  request_store (1.0.5) lib/request_store/middleware.rb:9:in `call'
  rack (1.6.4) lib/rack/etag.rb:24:in `call'
  rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
  rack (1.6.4) lib/rack/head.rb:13:in `call'
  actionpack-xml_parser (1.0.2) lib/action_dispatch/xml_params_parser.rb:16:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/flash.rb:260:in `call'
  rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  activerecord (4.2.3) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.2.3) lib/active_support/callbacks.rb:84:in `run_callbacks'
  actionpack (4.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.3) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.3) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.3) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.3) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/static.rb:116:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  railties (4.2.3) lib/rails/engine.rb:518:in `call'
  railties (4.2.3) lib/rails/application.rb:165:in `call'
  railties (4.2.3) lib/rails/railtie.rb:194:in `public_send'
  railties (4.2.3) lib/rails/railtie.rb:194:in `method_missing'
  unicorn (4.9.0) lib/unicorn/http_server.rb:580:in `process_client'
  unicorn (4.9.0) lib/unicorn/http_server.rb:674:in `worker_loop'
  unicorn (4.9.0) lib/unicorn/http_server.rb:529:in `spawn_missing_workers'
  unicorn (4.9.0) lib/unicorn/http_server.rb:140:in `start'
  unicorn (4.9.0) bin/unicorn_rails:209:in `<top (required)>'
  /usr/local/bin/unicorn_rails:23:in `load'
  /usr/local/bin/unicorn_rails:23:in `<main>'

DB fields not set

Hi,

I installed this plugin and there were no errors during installation.

Unfortunately it is not working. The Database fields 'next_run_date' and 'last_assigned_date' are not set after creating a recurring Task. I have no experience in ruby development. Is there anything I can do to fix this?

Environment Details
Redmine version: 2.3.1.stable.11966
Ruby version: 1.8.7 (x86_64-linux)
Rails version: 3.2.13
Environment: production
Database adapter: Mysql2

custom fields with "Required"

Periodictask does not create the issue in project there "Required" Custom fields applied. No errors in logs, just no issue after assigning. Please help how to fix it.

not automatically creates issues

Hello,
in redmine 3.3.0.stable not automatically creates issues with environment:

Redmine version 3.3.0.stable
Ruby version 2.3.3-p222 (2016-11-21) [x86_64-linux]
Rails version 4.2.6
Environment production
Database adapter Mysql2
,possibly problem with version ruby?

thanks

Incorrect label

There are incorrect labels in files app / views / periodictask / edit.html.erb and app / views / periodictask / new.html.erb. In file app / views / periodictask / edit.html.erb must be written label ":label_edit_periodic_task", but not ":label_new_periodic_task". The same error in the file app / views / periodictask / new.html.erb

Close Ticket until a date and re-open it automaticly

Hello,

maybe it is a cool and simple feature:
For example. You got a Ticket closed it but you need to do the same in maybe 2 weeks again.

It would be great if you can set this in the ticket to create a duplicate for the periodic-task.

Fix description

in master branch File init.rb "for Redmine" to "for Redmine2 and 3"

Incompatibility with Luxury Buttons plugin

The plugin has an incompatibility with Luxury Buttons plugin. Tasks are not creating, but time when tasks will be created is increased. I've found the following error in code:

irb(main):002:0> issue = Issue.new(:project_id=>122, :tracker_id=>5, :category_id=>nil, :assigned_to_id=>6, :author_id=>19, :subject=>"ttt", :description=>"ttt");
irb(main):003:0* issue.save!
ActiveRecord::RecordInvalid: Validation failed: You couldnt save issues with this tracker from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/validations.rb:79:in raise_record_invalid'
from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/validations.rb:43:in save!' from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/attribute_methods/dirty.rb:29:in save!'
from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/transactions.rb:291:in block in save!' from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/transactions.rb:351:in block in with_transaction_returning_status'
from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in block in transaction' from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in within_new_transaction'
from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in transaction' from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in transaction'
from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/transactions.rb:348:in with_transaction_returning_status' from /usr/local/bundle/gems/activerecord-4.2.6/lib/active_record/transactions.rb:291:in save!'
from (irb):3
from /usr/local/bundle/gems/railties-4.2.6/lib/rails/commands/console.rb:110:in start' from /usr/local/bundle/gems/railties-4.2.6/lib/rails/commands/console.rb:9:in start'
from /usr/local/bundle/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:68:in console' from /usr/local/bundle/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in run_command!'
from /usr/local/bundle/gems/railties-4.2.6/lib/rails/commands.rb:17:in <top (required)>' from bin/rails:4:in require'
from bin/rails:4:in `

'

How can I solve the problem?

Set status at new task

My using redmine version is 2.6.9.
This version can't support default status per tracker.

I use this plugin for notification of every month. It's great plugin.
But this plugin can't set a status at new task. So at making the periodic task, the notification send to assigned user. And then the redmine reminder send the notification to all.
I would like to send the email notification at once.
If this plugin can set the end of task status, the redmine reminder will not send the notification for this task.

I would like to support the editing status in this plugin.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.