Giter Club home page Giter Club logo

redmine-periodic-task's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redmine-periodic-task's Issues

Integrate into issues

Would be greate to integrate periodic tasks into redmine issues. Tasks defined can generate a new issue or change status (start date, due_date, ...)

Error on running cron job

The tasks I set up weren't appearing, so ran the job by hand from the public directory:

sudo rake --trace redmine:check_periodictasks RAILS_ENV=“production”

which returned this error (trace on):

NOTE: SourceIndex.new(hash) is deprecated; From /usr/share/redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in new'. Please install RDoc 2.4.2+ to generate documentation. rake aborted! undefined method[]' for nil:NilClass
/usr/share/redmine/config/environment.rb:32
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:inrequire'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:182:in require' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:547:innew_constants_in'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:182:in require' /usr/share/redmine/vendor/plugins/Redmine-Periodic-Task/lib/tasks/periodictask.rake:7 /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:171:inload_without_new_constant_marking'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:171:in load' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:547:innew_constants_in'
/usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:171:in load' /usr/share/redmine/vendor/rails/railties/lib/tasks/rails.rb:13 /usr/share/redmine/vendor/rails/railties/lib/tasks/rails.rb:13:ineach'
/usr/share/redmine/vendor/rails/railties/lib/tasks/rails.rb:13
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:inrequire'
/usr/share/redmine/Rakefile:10
/usr/lib/ruby/1.8/rake.rb:2383:in load' /usr/lib/ruby/1.8/rake.rb:2383:inraw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in load_rakefile' /usr/lib/ruby/1.8/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in load_rakefile' /usr/lib/ruby/1.8/rake.rb:2000:inrun'
/usr/lib/ruby/1.8/rake.rb:2068:in standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1998:inrun'
/usr/bin/rake:28

If I'm missing something obvious, let me know as I'm new to Ruby.

Redmine-Periodic-Task plugin installation on Windows 7

Greetings from Chile!
I'm relative new on Redmine (I just installed redmine yesterday) so I'm new installing plugins... somebody could write a step-by-step tutorial in order to install Redmine-Periodic-Task plugin?

I have a machine with Windows 7, and I have also redmine-2.2.3-0

throws error 500 on Redmine 1.4.3

Observation:
I took it for a quick spin, and it resulted in utterly breaking most of my Redmine installation (in a reversible way, so no big deal :) ).
This may also be of interest to you in case you want to port it to Redmine 2.

Expectation:
Should work in Redmine 1.4

Additional info:

Version is:
Redmine 1.4.3.stable (MySQL)

production.log says:

Processing DocumentsController#index (for 192.168.178.2 at 2012-07-29 08:04:45) [GET]
  Parameters: {"action"=>"index", "controller"=>"documents", "project_id"=>"t1"}
Rendering template within layouts/base
Rendering documents/index

ActionView::TemplateError (No route matches {:controller=>"periodictask", :project_id=>#, :action=>"index"}) on line #57 of app/views/layouts/base.html.erb:

Next run date is calculated improperly

Today is 2011-12-01. I have a task with next date set, say, to 2011-12-01 00:00:00.
When cron job runs at 01:00, next run time is set to something like 2012-01-01 01:00:30 (seconds depend on cron job run time). Then, because you are comparing next run date to today's date only (without time), next time this task actually runs is 2012-01-02, and next run time would be set to 2012-02-02 01:00:30 and so on.

The simple solution would be to do:
task.next_run_date = interval.send(units.downcase).from_now.to_date
in scheduled_tasks_checker.rb, converting DateTime to Date, so next run time for today's task would be set to 2012-01-01 00:00:00.

de locale utf8 without BOM

German strings go here for Rails i18n

de:
field_interval_number: Intervallnummer
field_next_run_date: Nächster Lauf am (yyyy-mm-dd hh:mm:ss)

label_assigned_to_user: Zugewiesen an
no_members_in_project: Dieses Projekt hat keine Mitglieder
label_subject: Thema
label_next_run_date: Nächster Lauf

Deprecated implementation

Here is the log generated when the cron is running:

DEPRECATION WARNING: Currently, Active Record suppresses errors raised within `after_rollback`/`after_commit` callbacks and only print them to the logs. In the next version, these errors will no longer be suppressed. Instead, the errors will propagate normally just like in other Active Record callbacks.

You can opt into the new behavior and remove this warning by setting:

  config.active_record.raise_in_transactional_callbacks = true

 (called from block in tsort_each at /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:226)
Starting Maintenance Mode plugin for Redmine
Starting Pretend plugin for RedMine
DEPRECATION WARNING: Defining a route where `to` is a controller without an action is deprecated. Please change `to: 'issue_templates'` to `controller: 'issue_templates'`. (called from block (3 levels) in <top (required)> at (eval):3)
DEPRECATION WARNING: Defining a route where `to` is a controller without an action is deprecated. Please change `to: 'issue_templates_settings'` to `controller: 'issue_templates_settings'`. (called from block (3 levels) in <top (required)> at (eval):6)
DEPRECATION WARNING: Defining a route where `to` is a controller without an action is deprecated. Please change `to: 'global_issue_templates'` to `controller: 'global_issue_templates'`. (called from block (3 levels) in <top (required)> at (eval):10)

Improvements needed ...

  • not all visible strings are configurable
    I've tried to make a german locale (de.yml) but I found that not all visible strings are
    configurable. If that is changed, I'd be pleased to supply my translation
  • Integrate under "modules"
    Not all projects need the periodic tasks feature. It would be nice if it could be integrated under
    "modules" and thereby could be hidden & disabled if not needed.
  • Some more standard fields of a real issue (i.e. description, priority, status,)

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.