Skip to content

Commit

Permalink
Adapted plugin to Redmine 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
edtsech committed Feb 14, 2010
1 parent c1d2738 commit 15691d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
12 changes: 6 additions & 6 deletions README.rdoc
@@ -1,26 +1,26 @@
= Issue_closed

This redmine plugin closing issues a week after their "Resolving".

== Installing delayed_job:

To working plugin Redmine Issue Closed you need to install and start delayed_job.
Delayed job is plugin for background processes.

1) sudo gem install delayed_job

2) script/plugin install git://github.com/kossnocorp/delayed_job.git
1) script/plugin install git://github.com/kossnocorp/delayed_job.git

3) script/generate delayed_job
2) script/generate delayed_job
rake db:migrate

4) create config/initializers/delayed_job_config.rb and add inside this code:
3) create config/initializers/delayed_job_config.rb and add inside this code:

Delayed::Job.destroy_failed_jobs = false
silence_warnings do
Delayed::Job.const_set("MAX_ATTEMPTS", 3)
Delayed::Job.const_set("MAX_RUN_TIME", 7.days)
end

5) rake jobs:work -> for starting background processes
4) rake jobs:work -> for starting background processes

If'll have some problems you would get information by this link:
http://github.com/collectiveidea/delayed_job
Expand Down
18 changes: 5 additions & 13 deletions lib/issue_closed.rb
Expand Up @@ -13,14 +13,10 @@ module IssueStatusesController
def self.included base
base.class_eval do

alias _list list

def index
list
end
alias_method :_index, :index unless method_defined? :_index

def list
collect_issue_statuses
def index
_index
render :template => 'issue_statuses/issue_closed_list'
end

Expand All @@ -36,11 +32,7 @@ def update_issue_closed
end
status.save!
end
redirect_to :action => :list
end
protected
def collect_issue_statuses
@issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 25, :order => "position"
redirect_to :action => :index
end
end
end
Expand All @@ -63,7 +55,7 @@ def destroy_issue
module IssuesController
def self.included base
base.class_eval do
alias _edit edit
alias_method :_edit, :edit unless method_defined? :_edit

def edit
status_before_update = @issue.status
Expand Down

0 comments on commit 15691d3

Please sign in to comment.