Skip to content

Instantly share code, notes, and snippets.

@vividtone
Created October 28, 2011 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vividtone/1321761 to your computer and use it in GitHub Desktop.
Save vividtone/1321761 to your computer and use it in GitHub Desktop.
Redmineのチケット更新の履歴を表示
# encoding: utf-8
# issue_updates.rb
#
# Redmineのチケットに対する更新の一覧を日付順に表示します。
#
# 使い方:
# Redmineのインストールディレクトリで以下のように実行。
#
# cript/runner -e production issue_updates.rb
#
journals = Journal.find(
:all,
:conditions => ['journalized_type = "Issue"'],
:joins => 'inner join (issues) on (journalized_id = issues.id)',
:order => :created_on)
journals.each do |journal|
puts "#{journal.created_on.to_date}\t#{journal.issue.project.identifier}\t##{journal.issue.id}\t#{journal.user.login}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment