##// END OF EJS Templates
Merged r2426 and r2484 from trunk....
Jean-Philippe Lang -
r2449:28e4ff895717
parent child
Show More
@@ -0,0 +1,2
1 <p><%= l(:notice_account_activated) %></p>
2 <p><%= l(:label_login) %>: <%= link_to @login_url, @login_url %></p>
@@ -0,0 +1,2
1 <%= l(:notice_account_activated) %>
2 <%= l(:label_login) %>: <%= @login_url %>
@@ -1,104 +1,108
1 1 # redMine - project management software
2 2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 class UsersController < ApplicationController
19 19 before_filter :require_admin
20 20
21 21 helper :sort
22 22 include SortHelper
23 23 helper :custom_fields
24 24 include CustomFieldsHelper
25 25
26 26 def index
27 27 list
28 28 render :action => 'list' unless request.xhr?
29 29 end
30 30
31 31 def list
32 32 sort_init 'login', 'asc'
33 33 sort_update %w(login firstname lastname mail admin created_on last_login_on)
34 34
35 35 @status = params[:status] ? params[:status].to_i : 1
36 36 c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status])
37 37
38 38 unless params[:name].blank?
39 39 name = "%#{params[:name].strip.downcase}%"
40 40 c << ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ?", name, name, name]
41 41 end
42 42
43 43 @user_count = User.count(:conditions => c.conditions)
44 44 @user_pages = Paginator.new self, @user_count,
45 45 per_page_option,
46 46 params['page']
47 47 @users = User.find :all,:order => sort_clause,
48 48 :conditions => c.conditions,
49 49 :limit => @user_pages.items_per_page,
50 50 :offset => @user_pages.current.offset
51 51
52 52 render :action => "list", :layout => false if request.xhr?
53 53 end
54 54
55 55 def add
56 56 if request.get?
57 57 @user = User.new(:language => Setting.default_language)
58 58 else
59 59 @user = User.new(params[:user])
60 60 @user.admin = params[:user][:admin] || false
61 61 @user.login = params[:user][:login]
62 62 @user.password, @user.password_confirmation = params[:password], params[:password_confirmation] unless @user.auth_source_id
63 63 if @user.save
64 64 Mailer.deliver_account_information(@user, params[:password]) if params[:send_information]
65 65 flash[:notice] = l(:notice_successful_create)
66 66 redirect_to :action => 'list'
67 67 end
68 68 end
69 69 @auth_sources = AuthSource.find(:all)
70 70 end
71 71
72 72 def edit
73 73 @user = User.find(params[:id])
74 74 if request.post?
75 75 @user.admin = params[:user][:admin] if params[:user][:admin]
76 76 @user.login = params[:user][:login] if params[:user][:login]
77 77 @user.password, @user.password_confirmation = params[:password], params[:password_confirmation] unless params[:password].nil? or params[:password].empty? or @user.auth_source_id
78 if @user.update_attributes(params[:user])
78 @user.attributes = params[:user]
79 # Was the account actived ? (do it before User#save clears the change)
80 was_activated = (@user.status_change == [User::STATUS_REGISTERED, User::STATUS_ACTIVE])
81 if @user.save
82 Mailer.deliver_account_activated(@user) if was_activated
79 83 flash[:notice] = l(:notice_successful_update)
80 84 # Give a string to redirect_to otherwise it would use status param as the response code
81 85 redirect_to(url_for(:action => 'list', :status => params[:status], :page => params[:page]))
82 86 end
83 87 end
84 88 @auth_sources = AuthSource.find(:all)
85 89 @roles = Role.find_all_givable
86 90 @projects = Project.find(:all, :order => 'name', :conditions => "status=#{Project::STATUS_ACTIVE}") - @user.projects
87 91 @membership ||= Member.new
88 92 @memberships = @user.memberships
89 93 end
90 94
91 95 def edit_membership
92 96 @user = User.find(params[:id])
93 97 @membership = params[:membership_id] ? Member.find(params[:membership_id]) : Member.new(:user => @user)
94 98 @membership.attributes = params[:membership]
95 99 @membership.save if request.post?
96 100 redirect_to :action => 'edit', :id => @user, :tab => 'memberships'
97 101 end
98 102
99 103 def destroy_membership
100 104 @user = User.find(params[:id])
101 105 Member.find(params[:membership_id]).destroy if request.post?
102 106 redirect_to :action => 'edit', :id => @user, :tab => 'memberships'
103 107 end
104 108 end
@@ -1,192 +1,199
1 1 # redMine - project management software
2 2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 class MailHandler < ActionMailer::Base
19 19 include ActionView::Helpers::SanitizeHelper
20 20
21 21 class UnauthorizedAction < StandardError; end
22 22 class MissingInformation < StandardError; end
23 23
24 24 attr_reader :email, :user
25 25
26 26 def self.receive(email, options={})
27 27 @@handler_options = options.dup
28 28
29 29 @@handler_options[:issue] ||= {}
30 30
31 31 @@handler_options[:allow_override] = @@handler_options[:allow_override].split(',').collect(&:strip) if @@handler_options[:allow_override].is_a?(String)
32 32 @@handler_options[:allow_override] ||= []
33 33 # Project needs to be overridable if not specified
34 34 @@handler_options[:allow_override] << 'project' unless @@handler_options[:issue].has_key?(:project)
35 35 # Status overridable by default
36 36 @@handler_options[:allow_override] << 'status' unless @@handler_options[:issue].has_key?(:status)
37 37 super email
38 38 end
39 39
40 40 # Processes incoming emails
41 41 def receive(email)
42 42 @email = email
43 43 @user = User.active.find(:first, :conditions => ["LOWER(mail) = ?", email.from.first.to_s.strip.downcase])
44 44 unless @user
45 45 # Unknown user => the email is ignored
46 46 # TODO: ability to create the user's account
47 47 logger.info "MailHandler: email submitted by unknown user [#{email.from.first}]" if logger && logger.info
48 48 return false
49 49 end
50 50 User.current = @user
51 51 dispatch
52 52 end
53 53
54 54 private
55 55
56 56 ISSUE_REPLY_SUBJECT_RE = %r{\[[^\]]+#(\d+)\]}
57 57
58 58 def dispatch
59 59 if m = email.subject.match(ISSUE_REPLY_SUBJECT_RE)
60 60 receive_issue_update(m[1].to_i)
61 61 else
62 62 receive_issue
63 63 end
64 64 rescue ActiveRecord::RecordInvalid => e
65 65 # TODO: send a email to the user
66 66 logger.error e.message if logger
67 67 false
68 68 rescue MissingInformation => e
69 69 logger.error "MailHandler: missing information from #{user}: #{e.message}" if logger
70 70 false
71 71 rescue UnauthorizedAction => e
72 72 logger.error "MailHandler: unauthorized attempt from #{user}" if logger
73 73 false
74 74 end
75 75
76 76 # Creates a new issue
77 77 def receive_issue
78 78 project = target_project
79 79 tracker = (get_keyword(:tracker) && project.trackers.find_by_name(get_keyword(:tracker))) || project.trackers.find(:first)
80 80 category = (get_keyword(:category) && project.issue_categories.find_by_name(get_keyword(:category)))
81 81 priority = (get_keyword(:priority) && Enumeration.find_by_opt_and_name('IPRI', get_keyword(:priority)))
82 82 status = (get_keyword(:status) && IssueStatus.find_by_name(get_keyword(:status)))
83 83
84 84 # check permission
85 85 raise UnauthorizedAction unless user.allowed_to?(:add_issues, project)
86 86 issue = Issue.new(:author => user, :project => project, :tracker => tracker, :category => category, :priority => priority)
87 87 # check workflow
88 88 if status && issue.new_statuses_allowed_to(user).include?(status)
89 89 issue.status = status
90 90 end
91 91 issue.subject = email.subject.chomp.toutf8
92 92 issue.description = plain_text_body
93 93 # custom fields
94 94 issue.custom_field_values = issue.available_custom_fields.inject({}) do |h, c|
95 95 if value = get_keyword(c.name, :override => true)
96 96 h[c.id] = value
97 97 end
98 98 h
99 99 end
100 100 issue.save!
101 101 add_attachments(issue)
102 102 logger.info "MailHandler: issue ##{issue.id} created by #{user}" if logger && logger.info
103 103 # add To and Cc as watchers
104 104 add_watchers(issue)
105 105 # send notification after adding watchers so that they can reply to Redmine
106 106 Mailer.deliver_issue_add(issue) if Setting.notified_events.include?('issue_added')
107 107 issue
108 108 end
109 109
110 110 def target_project
111 111 # TODO: other ways to specify project:
112 112 # * parse the email To field
113 113 # * specific project (eg. Setting.mail_handler_target_project)
114 114 target = Project.find_by_identifier(get_keyword(:project))
115 115 raise MissingInformation.new('Unable to determine target project') if target.nil?
116 116 target
117 117 end
118 118
119 119 # Adds a note to an existing issue
120 120 def receive_issue_update(issue_id)
121 121 status = (get_keyword(:status) && IssueStatus.find_by_name(get_keyword(:status)))
122 122
123 123 issue = Issue.find_by_id(issue_id)
124 124 return unless issue
125 125 # check permission
126 126 raise UnauthorizedAction unless user.allowed_to?(:add_issue_notes, issue.project) || user.allowed_to?(:edit_issues, issue.project)
127 127 raise UnauthorizedAction unless status.nil? || user.allowed_to?(:edit_issues, issue.project)
128 128
129 129 # add the note
130 130 journal = issue.init_journal(user, plain_text_body)
131 131 add_attachments(issue)
132 132 # check workflow
133 133 if status && issue.new_statuses_allowed_to(user).include?(status)
134 134 issue.status = status
135 135 end
136 136 issue.save!
137 137 logger.info "MailHandler: issue ##{issue.id} updated by #{user}" if logger && logger.info
138 138 Mailer.deliver_issue_edit(journal) if Setting.notified_events.include?('issue_updated')
139 139 journal
140 140 end
141 141
142 142 def add_attachments(obj)
143 143 if email.has_attachments?
144 144 email.attachments.each do |attachment|
145 145 Attachment.create(:container => obj,
146 146 :file => attachment,
147 147 :author => user,
148 148 :content_type => attachment.content_type)
149 149 end
150 150 end
151 151 end
152 152
153 153 # Adds To and Cc as watchers of the given object if the sender has the
154 154 # appropriate permission
155 155 def add_watchers(obj)
156 156 if user.allowed_to?("add_#{obj.class.name.underscore}_watchers".to_sym, obj.project)
157 157 addresses = [email.to, email.cc].flatten.compact.uniq.collect {|a| a.strip.downcase}
158 158 unless addresses.empty?
159 159 watchers = User.active.find(:all, :conditions => ['LOWER(mail) IN (?)', addresses])
160 160 watchers.each {|w| obj.add_watcher(w)}
161 161 end
162 162 end
163 163 end
164 164
165 165 def get_keyword(attr, options={})
166 if (options[:override] || @@handler_options[:allow_override].include?(attr.to_s)) && plain_text_body =~ /^#{attr}:[ \t]*(.+)$/i
167 $1.strip
168 elsif !@@handler_options[:issue][attr].blank?
169 @@handler_options[:issue][attr]
166 @keywords ||= {}
167 if @keywords.has_key?(attr)
168 @keywords[attr]
169 else
170 @keywords[attr] = begin
171 if (options[:override] || @@handler_options[:allow_override].include?(attr.to_s)) && plain_text_body.gsub!(/^#{attr}:[ \t]*(.+)\s*$/i, '')
172 $1.strip
173 elsif !@@handler_options[:issue][attr].blank?
174 @@handler_options[:issue][attr]
175 end
176 end
170 177 end
171 178 end
172 179
173 180 # Returns the text/plain part of the email
174 181 # If not found (eg. HTML-only email), returns the body with tags removed
175 182 def plain_text_body
176 183 return @plain_text_body unless @plain_text_body.nil?
177 184 parts = @email.parts.collect {|c| (c.respond_to?(:parts) && !c.parts.empty?) ? c.parts : c}.flatten
178 185 if parts.empty?
179 186 parts << @email
180 187 end
181 188 plain_text_part = parts.detect {|p| p.content_type == 'text/plain'}
182 189 if plain_text_part.nil?
183 190 # no text/plain part found, assuming html-only email
184 191 # strip html tags and remove doctype directive
185 192 @plain_text_body = strip_tags(@email.body.to_s)
186 193 @plain_text_body.gsub! %r{^<!DOCTYPE .*$}, ''
187 194 else
188 195 @plain_text_body = plain_text_part.body.to_s
189 196 end
190 197 @plain_text_body.strip!
191 198 end
192 199 end
@@ -1,253 +1,262
1 1 # redMine - project management software
2 2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 class Mailer < ActionMailer::Base
19 19 helper :application
20 20 helper :issues
21 21 helper :custom_fields
22 22
23 23 include ActionController::UrlWriter
24 24
25 25 def issue_add(issue)
26 26 redmine_headers 'Project' => issue.project.identifier,
27 27 'Issue-Id' => issue.id,
28 28 'Issue-Author' => issue.author.login
29 29 redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
30 30 recipients issue.recipients
31 31 cc(issue.watcher_recipients - @recipients)
32 32 subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}"
33 33 body :issue => issue,
34 34 :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
35 35 end
36 36
37 37 def issue_edit(journal)
38 38 issue = journal.journalized
39 39 redmine_headers 'Project' => issue.project.identifier,
40 40 'Issue-Id' => issue.id,
41 41 'Issue-Author' => issue.author.login
42 42 redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
43 43 @author = journal.user
44 44 recipients issue.recipients
45 45 # Watchers in cc
46 46 cc(issue.watcher_recipients - @recipients)
47 47 s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] "
48 48 s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
49 49 s << issue.subject
50 50 subject s
51 51 body :issue => issue,
52 52 :journal => journal,
53 53 :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
54 54 end
55 55
56 56 def reminder(user, issues, days)
57 57 set_language_if_valid user.language
58 58 recipients user.mail
59 59 subject l(:mail_subject_reminder, issues.size)
60 60 body :issues => issues,
61 61 :days => days,
62 62 :issues_url => url_for(:controller => 'issues', :action => 'index', :set_filter => 1, :assigned_to_id => user.id, :sort_key => 'due_date', :sort_order => 'asc')
63 63 end
64 64
65 65 def document_added(document)
66 66 redmine_headers 'Project' => document.project.identifier
67 67 recipients document.project.recipients
68 68 subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
69 69 body :document => document,
70 70 :document_url => url_for(:controller => 'documents', :action => 'show', :id => document)
71 71 end
72 72
73 73 def attachments_added(attachments)
74 74 container = attachments.first.container
75 75 added_to = ''
76 76 added_to_url = ''
77 77 case container.class.name
78 78 when 'Project'
79 79 added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container)
80 80 added_to = "#{l(:label_project)}: #{container}"
81 81 when 'Version'
82 82 added_to_url = url_for(:controller => 'projects', :action => 'list_files', :id => container.project_id)
83 83 added_to = "#{l(:label_version)}: #{container.name}"
84 84 when 'Document'
85 85 added_to_url = url_for(:controller => 'documents', :action => 'show', :id => container.id)
86 86 added_to = "#{l(:label_document)}: #{container.title}"
87 87 end
88 88 redmine_headers 'Project' => container.project.identifier
89 89 recipients container.project.recipients
90 90 subject "[#{container.project.name}] #{l(:label_attachment_new)}"
91 91 body :attachments => attachments,
92 92 :added_to => added_to,
93 93 :added_to_url => added_to_url
94 94 end
95 95
96 96 def news_added(news)
97 97 redmine_headers 'Project' => news.project.identifier
98 98 recipients news.project.recipients
99 99 subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}"
100 100 body :news => news,
101 101 :news_url => url_for(:controller => 'news', :action => 'show', :id => news)
102 102 end
103 103
104 104 def message_posted(message, recipients)
105 105 redmine_headers 'Project' => message.project.identifier,
106 106 'Topic-Id' => (message.parent_id || message.id)
107 107 recipients(recipients)
108 108 subject "[#{message.board.project.name} - #{message.board.name}] #{message.subject}"
109 109 body :message => message,
110 110 :message_url => url_for(:controller => 'messages', :action => 'show', :board_id => message.board_id, :id => message.root)
111 111 end
112 112
113 113 def account_information(user, password)
114 114 set_language_if_valid user.language
115 115 recipients user.mail
116 116 subject l(:mail_subject_register, Setting.app_title)
117 117 body :user => user,
118 118 :password => password,
119 119 :login_url => url_for(:controller => 'account', :action => 'login')
120 120 end
121 121
122 122 def account_activation_request(user)
123 123 # Send the email to all active administrators
124 124 recipients User.active.find(:all, :conditions => {:admin => true}).collect { |u| u.mail }.compact
125 125 subject l(:mail_subject_account_activation_request, Setting.app_title)
126 126 body :user => user,
127 127 :url => url_for(:controller => 'users', :action => 'index', :status => User::STATUS_REGISTERED, :sort_key => 'created_on', :sort_order => 'desc')
128 128 end
129 129
130 # A registered user's account was activated by an administrator
131 def account_activated(user)
132 set_language_if_valid user.language
133 recipients user.mail
134 subject l(:mail_subject_register, Setting.app_title)
135 body :user => user,
136 :login_url => url_for(:controller => 'account', :action => 'login')
137 end
138
130 139 def lost_password(token)
131 140 set_language_if_valid(token.user.language)
132 141 recipients token.user.mail
133 142 subject l(:mail_subject_lost_password, Setting.app_title)
134 143 body :token => token,
135 144 :url => url_for(:controller => 'account', :action => 'lost_password', :token => token.value)
136 145 end
137 146
138 147 def register(token)
139 148 set_language_if_valid(token.user.language)
140 149 recipients token.user.mail
141 150 subject l(:mail_subject_register, Setting.app_title)
142 151 body :token => token,
143 152 :url => url_for(:controller => 'account', :action => 'activate', :token => token.value)
144 153 end
145 154
146 155 def test(user)
147 156 set_language_if_valid(user.language)
148 157 recipients user.mail
149 158 subject 'Redmine test'
150 159 body :url => url_for(:controller => 'welcome')
151 160 end
152 161
153 162 # Overrides default deliver! method to prevent from sending an email
154 163 # with no recipient, cc or bcc
155 164 def deliver!(mail = @mail)
156 165 return false if (recipients.nil? || recipients.empty?) &&
157 166 (cc.nil? || cc.empty?) &&
158 167 (bcc.nil? || bcc.empty?)
159 168 super
160 169 end
161 170
162 171 # Sends reminders to issue assignees
163 172 # Available options:
164 173 # * :days => how many days in the future to remind about (defaults to 7)
165 174 # * :tracker => id of tracker for filtering issues (defaults to all trackers)
166 175 # * :project => id or identifier of project to process (defaults to all projects)
167 176 def self.reminders(options={})
168 177 days = options[:days] || 7
169 178 project = options[:project] ? Project.find(options[:project]) : nil
170 179 tracker = options[:tracker] ? Tracker.find(options[:tracker]) : nil
171 180
172 181 s = ARCondition.new ["#{IssueStatus.table_name}.is_closed = ? AND #{Issue.table_name}.due_date <= ?", false, days.day.from_now.to_date]
173 182 s << "#{Issue.table_name}.assigned_to_id IS NOT NULL"
174 183 s << "#{Project.table_name}.status = #{Project::STATUS_ACTIVE}"
175 184 s << "#{Issue.table_name}.project_id = #{project.id}" if project
176 185 s << "#{Issue.table_name}.tracker_id = #{tracker.id}" if tracker
177 186
178 187 issues_by_assignee = Issue.find(:all, :include => [:status, :assigned_to, :project, :tracker],
179 188 :conditions => s.conditions
180 189 ).group_by(&:assigned_to)
181 190 issues_by_assignee.each do |assignee, issues|
182 191 deliver_reminder(assignee, issues, days) unless assignee.nil?
183 192 end
184 193 end
185 194
186 195 private
187 196 def initialize_defaults(method_name)
188 197 super
189 198 set_language_if_valid Setting.default_language
190 199 from Setting.mail_from
191 200
192 201 # URL options
193 202 h = Setting.host_name
194 203 h = h.to_s.gsub(%r{\/.*$}, '') unless ActionController::AbstractRequest.relative_url_root.blank?
195 204 default_url_options[:host] = h
196 205 default_url_options[:protocol] = Setting.protocol
197 206
198 207 # Common headers
199 208 headers 'X-Mailer' => 'Redmine',
200 209 'X-Redmine-Host' => Setting.host_name,
201 210 'X-Redmine-Site' => Setting.app_title
202 211 end
203 212
204 213 # Appends a Redmine header field (name is prepended with 'X-Redmine-')
205 214 def redmine_headers(h)
206 215 h.each { |k,v| headers["X-Redmine-#{k}"] = v }
207 216 end
208 217
209 218 # Overrides the create_mail method
210 219 def create_mail
211 220 # Removes the current user from the recipients and cc
212 221 # if he doesn't want to receive notifications about what he does
213 222 @author ||= User.current
214 223 if @author.pref[:no_self_notified]
215 224 recipients.delete(@author.mail) if recipients
216 225 cc.delete(@author.mail) if cc
217 226 end
218 227 # Blind carbon copy recipients
219 228 if Setting.bcc_recipients?
220 229 bcc([recipients, cc].flatten.compact.uniq)
221 230 recipients []
222 231 cc []
223 232 end
224 233 super
225 234 end
226 235
227 236 # Renders a message with the corresponding layout
228 237 def render_message(method_name, body)
229 238 layout = method_name.match(%r{text\.html\.(rhtml|rxml)}) ? 'layout.text.html.rhtml' : 'layout.text.plain.rhtml'
230 239 body[:content_for_layout] = render(:file => method_name, :body => body)
231 240 ActionView::Base.new(template_root, body, self).render(:file => "mailer/#{layout}", :use_full_path => true)
232 241 end
233 242
234 243 # for the case of plain text only
235 244 def body(*params)
236 245 value = super(*params)
237 246 if Setting.plain_text_mail?
238 247 templates = Dir.glob("#{template_path}/#{@template}.text.plain.{rhtml,erb}")
239 248 unless String === @body or templates.empty?
240 249 template = File.basename(templates.first)
241 250 @body[:content_for_layout] = render(:file => template, :body => @body)
242 251 @body = ActionView::Base.new(template_root, @body, self).render(:file => "mailer/layout.text.plain.rhtml", :use_full_path => true)
243 252 return @body
244 253 end
245 254 end
246 255 return value
247 256 end
248 257
249 258 # Makes partial rendering work with Rails 1.2 (retro-compatibility)
250 259 def self.controller_path
251 260 ''
252 261 end unless respond_to?('controller_path')
253 262 end
@@ -1,859 +1,865
1 1 == Redmine changelog
2 2
3 3 Redmine - project management software
4 4 Copyright (C) 2006-2009 Jean-Philippe Lang
5 5 http://www.redmine.org/
6 6
7 7
8 == 2009-xx-xx v0.8.2
9
10 * Send an email to the user when an administrator activates a registered user
11 * Strip keywords from received email body
12
13
8 14 == 2009-02-15 v0.8.1
9 15
10 16 * Select watchers on new issue form
11 17 * Issue description is no longer a required field
12 18 * Files module: ability to add files without version
13 19 * Jump to the current tab when using the project quick-jump combo
14 20 * Display a warning if some attachments were not saved
15 21 * Import custom fields values from emails on issue creation
16 22 * Show view/annotate/download links on entry and annotate views
17 23 * Admin Info Screen: Display if plugin assets directory is writable
18 24 * Adds a 'Create and continue' button on the new issue form
19 25 * IMAP: add options to move received emails
20 26 * Do not show Category field when categories are not defined
21 27 * Lower the project identifier limit to a minimum of two characters
22 28 * Add "closed" html class to closed entries in issue list
23 29 * Fixed: broken redirect URL on login failure
24 30 * Fixed: Deleted files are shown when using Darcs
25 31 * Fixed: Darcs adapter works on Win32 only
26 32 * Fixed: syntax highlight doesn't appear in new ticket preview
27 33 * Fixed: email notification for changes I make still occurs when running Repository.fetch_changesets
28 34 * Fixed: no error is raised when entering invalid hours on the issue update form
29 35 * Fixed: Details time log report CSV export doesn't honour date format from settings
30 36 * Fixed: invalid css classes on issue details
31 37 * Fixed: Trac importer creates duplicate custom values
32 38 * Fixed: inline attached image should not match partial filename
33 39
34 40
35 41 == 2008-12-30 v0.8.0
36 42
37 43 * Setting added in order to limit the number of diff lines that should be displayed
38 44 * Makes logged-in username in topbar linking to
39 45 * Mail handler: strip tags when receiving a html-only email
40 46 * Mail handler: add watchers before sending notification
41 47 * Adds a css class (overdue) to overdue issues on issue lists and detail views
42 48 * Fixed: project activity truncated after viewing user's activity
43 49 * Fixed: email address entered for password recovery shouldn't be case-sensitive
44 50 * Fixed: default flag removed when editing a default enumeration
45 51 * Fixed: default category ignored when adding a document
46 52 * Fixed: error on repository user mapping when a repository username is blank
47 53 * Fixed: Firefox cuts off large diffs
48 54 * Fixed: CVS browser should not show dead revisions (deleted files)
49 55 * Fixed: escape double-quotes in image titles
50 56 * Fixed: escape textarea content when editing a issue note
51 57 * Fixed: JS error on context menu with IE
52 58 * Fixed: bold syntax around single character in series doesn't work
53 59 * Fixed several XSS vulnerabilities
54 60 * Fixed a SQL injection vulnerability
55 61
56 62
57 63 == 2008-12-07 v0.8.0-rc1
58 64
59 65 * Wiki page protection
60 66 * Wiki page hierarchy. Parent page can be assigned on the Rename screen
61 67 * Adds support for issue creation via email
62 68 * Adds support for free ticket filtering and custom queries on Gantt chart and calendar
63 69 * Cross-project search
64 70 * Ability to search a project and its subprojects
65 71 * Ability to search the projects the user belongs to
66 72 * Adds custom fields on time entries
67 73 * Adds boolean and list custom fields for time entries as criteria on time report
68 74 * Cross-project time reports
69 75 * Display latest user's activity on account/show view
70 76 * Show last connexion time on user's page
71 77 * Obfuscates email address on user's account page using javascript
72 78 * wiki TOC rendered as an unordered list
73 79 * Adds the ability to search for a user on the administration users list
74 80 * Adds the ability to search for a project name or identifier on the administration projects list
75 81 * Redirect user to the previous page after logging in
76 82 * Adds a permission 'view wiki edits' so that wiki history can be hidden to certain users
77 83 * Adds permissions for viewing the watcher list and adding new watchers on the issue detail view
78 84 * Adds permissions to let users edit and/or delete their messages
79 85 * Link to activity view when displaying dates
80 86 * Hide Redmine version in atom feeds and pdf properties
81 87 * Maps repository users to Redmine users. Users with same username or email are automatically mapped. Mapping can be manually adjusted in repository settings. Multiple usernames can be mapped to the same Redmine user.
82 88 * Sort users by their display names so that user dropdown lists are sorted alphabetically
83 89 * Adds estimated hours to issue filters
84 90 * Switch order of current and previous revisions in side-by-side diff
85 91 * Render the commit changes list as a tree
86 92 * Adds watch/unwatch functionality at forum topic level
87 93 * When moving an issue to another project, reassign it to the category with same name if any
88 94 * Adds child_pages macro for wiki pages
89 95 * Use GET instead of POST on roadmap (#718), gantt and calendar forms
90 96 * Search engine: display total results count and count by result type
91 97 * Email delivery configuration moved to an unversioned YAML file (config/email.yml, see the sample file)
92 98 * Adds icons on search results
93 99 * Adds 'Edit' link on account/show for admin users
94 100 * Adds Lock/Unlock/Activate link on user edit screen
95 101 * Adds user count in status drop down on admin user list
96 102 * Adds multi-levels blockquotes support by using > at the beginning of lines
97 103 * Adds a Reply link to each issue note
98 104 * Adds plain text only option for mail notifications
99 105 * Gravatar support for issue detail, user grid, and activity stream (disabled by default)
100 106 * Adds 'Delete wiki pages attachments' permission
101 107 * Show the most recent file when displaying an inline image
102 108 * Makes permission screens localized
103 109 * AuthSource list: display associated users count and disable 'Delete' buton if any
104 110 * Make the 'duplicates of' relation asymmetric
105 111 * Adds username to the password reminder email
106 112 * Adds links to forum messages using message#id syntax
107 113 * Allow same name for custom fields on different object types
108 114 * One-click bulk edition using the issue list context menu within the same project
109 115 * Adds support for commit logs reencoding to UTF-8 before insertion in the database. Source encoding of commit logs can be selected in Application settings -> Repositories.
110 116 * Adds checkboxes toggle links on permissions report
111 117 * Adds Trac-Like anchors on wiki headings
112 118 * Adds support for wiki links with anchor
113 119 * Adds category to the issue context menu
114 120 * Adds a workflow overview screen
115 121 * Appends the filename to the attachment url so that clients that ignore content-disposition http header get the real filename
116 122 * Dots allowed in custom field name
117 123 * Adds posts quoting functionality
118 124 * Adds an option to generate sequential project identifiers
119 125 * Adds mailto link on the user administration list
120 126 * Ability to remove enumerations (activities, priorities, document categories) that are in use. Associated objects can be reassigned to another value
121 127 * Gantt chart: display issues that don't have a due date if they are assigned to a version with a date
122 128 * Change projects homepage limit to 255 chars
123 129 * Improved on-the-fly account creation. If some attributes are missing (eg. not present in the LDAP) or are invalid, the registration form is displayed so that the user is able to fill or fix these attributes
124 130 * Adds "please select" to activity select box if no activity is set as default
125 131 * Do not silently ignore timelog validation failure on issue edit
126 132 * Adds a rake task to send reminder emails
127 133 * Allow empty cells in wiki tables
128 134 * Makes wiki text formatter pluggable
129 135 * Adds back textile acronyms support
130 136 * Remove pre tag attributes
131 137 * Plugin hooks
132 138 * Pluggable admin menu
133 139 * Plugins can provide activity content
134 140 * Moves plugin list to its own administration menu item
135 141 * Adds url and author_url plugin attributes
136 142 * Adds Plugin#requires_redmine method so that plugin compatibility can be checked against current Redmine version
137 143 * Adds atom feed on time entries details
138 144 * Adds project name to issues feed title
139 145 * Adds a css class on menu items in order to apply item specific styles (eg. icons)
140 146 * Adds a Redmine plugin generators
141 147 * Adds timelog link to the issue context menu
142 148 * Adds links to the user page on various views
143 149 * Turkish translation by Ismail Sezen
144 150 * Catalan translation
145 151 * Vietnamese translation
146 152 * Slovak translation
147 153 * Better naming of activity feed if only one kind of event is displayed
148 154 * Enable syntax highlight on issues, messages and news
149 155 * Add target version to the issue list context menu
150 156 * Hide 'Target version' filter if no version is defined
151 157 * Add filters on cross-project issue list for custom fields marked as 'For all projects'
152 158 * Turn ftp urls into links
153 159 * Hiding the View Differences button when a wiki page's history only has one version
154 160 * Messages on a Board can now be sorted by the number of replies
155 161 * Adds a class ('me') to events of the activity view created by current user
156 162 * Strip pre/code tags content from activity view events
157 163 * Display issue notes in the activity view
158 164 * Adds links to changesets atom feed on repository browser
159 165 * Track project and tracker changes in issue history
160 166 * Adds anchor to atom feed messages links
161 167 * Adds a key in lang files to set the decimal separator (point or comma) in csv exports
162 168 * Makes importer work with Trac 0.8.x
163 169 * Upgraded to Prototype 1.6.0.1
164 170 * File viewer for attached text files
165 171 * Menu mapper: add support for :before, :after and :last options to #push method and add #delete method
166 172 * Removed inconsistent revision numbers on diff view
167 173 * CVS: add support for modules names with spaces
168 174 * Log the user in after registration if account activation is not needed
169 175 * Mercurial adapter improvements
170 176 * Trac importer: read session_attribute table to find user's email and real name
171 177 * Ability to disable unused SCM adapters in application settings
172 178 * Adds Filesystem adapter
173 179 * Clear changesets and changes with raw sql when deleting a repository for performance
174 180 * Redmine.pm now uses the 'commit access' permission defined in Redmine
175 181 * Reposman can create any type of scm (--scm option)
176 182 * Reposman creates a repository if the 'repository' module is enabled at project level only
177 183 * Display svn properties in the browser, svn >= 1.5.0 only
178 184 * Reduces memory usage when importing large git repositories
179 185 * Wider SVG graphs in repository stats
180 186 * SubversionAdapter#entries performance improvement
181 187 * SCM browser: ability to download raw unified diffs
182 188 * More detailed error message in log when scm command fails
183 189 * Adds support for file viewing with Darcs 2.0+
184 190 * Check that git changeset is not in the database before creating it
185 191 * Unified diff viewer for attached files with .patch or .diff extension
186 192 * File size display with Bazaar repositories
187 193 * Git adapter: use commit time instead of author time
188 194 * Prettier url for changesets
189 195 * Makes changes link to entries on the revision view
190 196 * Adds a field on the repository view to browse at specific revision
191 197 * Adds new projects atom feed
192 198 * Added rake tasks to generate rcov code coverage reports
193 199 * Add Redcloth's :block_markdown_rule to allow horizontal rules in wiki
194 200 * Show the project hierarchy in the drop down list for new membership on user administration screen
195 201 * Split user edit screen into tabs
196 202 * Renames bundled RedCloth to RedCloth3 to avoid RedCloth 4 to be loaded instead
197 203 * Fixed: Roadmap crashes when a version has a due date > 2037
198 204 * Fixed: invalid effective date (eg. 99999-01-01) causes an error on version edition screen
199 205 * Fixed: login filter providing incorrect back_url for Redmine installed in sub-directory
200 206 * Fixed: logtime entry duplicated when edited from parent project
201 207 * Fixed: wrong digest for text files under Windows
202 208 * Fixed: associated revisions are displayed in wrong order on issue view
203 209 * Fixed: Git Adapter date parsing ignores timezone
204 210 * Fixed: Printing long roadmap doesn't split across pages
205 211 * Fixes custom fields display order at several places
206 212 * Fixed: urls containing @ are parsed as email adress by the wiki formatter
207 213 * Fixed date filters accuracy with SQLite
208 214 * Fixed: tokens not escaped in highlight_tokens regexp
209 215 * Fixed Bazaar shared repository browsing
210 216 * Fixes platform determination under JRuby
211 217 * Fixed: Estimated time in issue's journal should be rounded to two decimals
212 218 * Fixed: 'search titles only' box ignored after one search is done on titles only
213 219 * Fixed: non-ASCII subversion path can't be displayed
214 220 * Fixed: Inline images don't work if file name has upper case letters or if image is in BMP format
215 221 * Fixed: document listing shows on "my page" when viewing documents is disabled for the role
216 222 * Fixed: Latest news appear on the homepage for projects with the News module disabled
217 223 * Fixed: cross-project issue list should not show issues of projects for which the issue tracking module was disabled
218 224 * Fixed: the default status is lost when reordering issue statuses
219 225 * Fixes error with Postgresql and non-UTF8 commit logs
220 226 * Fixed: textile footnotes no longer work
221 227 * Fixed: http links containing parentheses fail to reder correctly
222 228 * Fixed: GitAdapter#get_rev should use current branch instead of hardwiring master
223 229
224 230
225 231 == 2008-07-06 v0.7.3
226 232
227 233 * Allow dot in firstnames and lastnames
228 234 * Add project name to cross-project Atom feeds
229 235 * Encoding set to utf8 in example database.yml
230 236 * HTML titles on forums related views
231 237 * Fixed: various XSS vulnerabilities
232 238 * Fixed: Entourage (and some old client) fails to correctly render notification styles
233 239 * Fixed: Fixed: timelog redirects inappropriately when :back_url is blank
234 240 * Fixed: wrong relative paths to images in wiki_syntax.html
235 241
236 242
237 243 == 2008-06-15 v0.7.2
238 244
239 245 * "New Project" link on Projects page
240 246 * Links to repository directories on the repo browser
241 247 * Move status to front in Activity View
242 248 * Remove edit step from Status context menu
243 249 * Fixed: No way to do textile horizontal rule
244 250 * Fixed: Repository: View differences doesn't work
245 251 * Fixed: attachement's name maybe invalid.
246 252 * Fixed: Error when creating a new issue
247 253 * Fixed: NoMethodError on @available_filters.has_key?
248 254 * Fixed: Check All / Uncheck All in Email Settings
249 255 * Fixed: "View differences" of one file at /repositories/revision/ fails
250 256 * Fixed: Column width in "my page"
251 257 * Fixed: private subprojects are listed on Issues view
252 258 * Fixed: Textile: bold, italics, underline, etc... not working after parentheses
253 259 * Fixed: Update issue form: comment field from log time end out of screen
254 260 * Fixed: Editing role: "issue can be assigned to this role" out of box
255 261 * Fixed: Unable use angular braces after include word
256 262 * Fixed: Using '*' as keyword for repository referencing keywords doesn't work
257 263 * Fixed: Subversion repository "View differences" on each file rise ERROR
258 264 * Fixed: View differences for individual file of a changeset fails if the repository URL doesn't point to the repository root
259 265 * Fixed: It is possible to lock out the last admin account
260 266 * Fixed: Wikis are viewable for anonymous users on public projects, despite not granting access
261 267 * Fixed: Issue number display clipped on 'my issues'
262 268 * Fixed: Roadmap version list links not carrying state
263 269 * Fixed: Log Time fieldset in IssueController#edit doesn't set default Activity as default
264 270 * Fixed: git's "get_rev" API should use repo's current branch instead of hardwiring "master"
265 271 * Fixed: browser's language subcodes ignored
266 272 * Fixed: Error on project selection with numeric (only) identifier.
267 273 * Fixed: Link to PDF doesn't work after creating new issue
268 274 * Fixed: "Replies" should not be shown on forum threads that are locked
269 275 * Fixed: SVN errors lead to svn username/password being displayed to end users (security issue)
270 276 * Fixed: http links containing hashes don't display correct
271 277 * Fixed: Allow ampersands in Enumeration names
272 278 * Fixed: Atom link on saved query does not include query_id
273 279 * Fixed: Logtime info lost when there's an error updating an issue
274 280 * Fixed: TOC does not parse colorization markups
275 281 * Fixed: CVS: add support for modules names with spaces
276 282 * Fixed: Bad rendering on projects/add
277 283 * Fixed: exception when viewing differences on cvs
278 284 * Fixed: export issue to pdf will messup when use Chinese language
279 285 * Fixed: Redmine::Scm::Adapters::GitAdapter#get_rev ignored GIT_BIN constant
280 286 * Fixed: Adding non-ASCII new issue type in the New Issue page have encoding error using IE
281 287 * Fixed: Importing from trac : some wiki links are messed
282 288 * Fixed: Incorrect weekend definition in Hebrew calendar locale
283 289 * Fixed: Atom feeds don't provide author section for repository revisions
284 290 * Fixed: In Activity views, changesets titles can be multiline while they should not
285 291 * Fixed: Ignore unreadable subversion directories (read disabled using authz)
286 292 * Fixed: lib/SVG/Graph/Graph.rb can't externalize stylesheets
287 293 * Fixed: Close statement handler in Redmine.pm
288 294
289 295
290 296 == 2008-05-04 v0.7.1
291 297
292 298 * Thai translation added (Gampol Thitinilnithi)
293 299 * Translations updates
294 300 * Escape HTML comment tags
295 301 * Prevent "can't convert nil into String" error when :sort_order param is not present
296 302 * Fixed: Updating tickets add a time log with zero hours
297 303 * Fixed: private subprojects names are revealed on the project overview
298 304 * Fixed: Search for target version of "none" fails with postgres 8.3
299 305 * Fixed: Home, Logout, Login links shouldn't be absolute links
300 306 * Fixed: 'Latest projects' box on the welcome screen should be hidden if there are no projects
301 307 * Fixed: error when using upcase language name in coderay
302 308 * Fixed: error on Trac import when :due attribute is nil
303 309
304 310
305 311 == 2008-04-28 v0.7.0
306 312
307 313 * Forces Redmine to use rails 2.0.2 gem when vendor/rails is not present
308 314 * Queries can be marked as 'For all projects'. Such queries will be available on all projects and on the global issue list.
309 315 * Add predefined date ranges to the time report
310 316 * Time report can be done at issue level
311 317 * Various timelog report enhancements
312 318 * Accept the following formats for "hours" field: 1h, 1 h, 1 hour, 2 hours, 30m, 30min, 1h30, 1h30m, 1:30
313 319 * Display the context menu above and/or to the left of the click if needed
314 320 * Make the admin project files list sortable
315 321 * Mercurial: display working directory files sizes unless browsing a specific revision
316 322 * Preserve status filter and page number when using lock/unlock/activate links on the users list
317 323 * Redmine.pm support for LDAP authentication
318 324 * Better error message and AR errors in log for failed LDAP on-the-fly user creation
319 325 * Redirected user to where he is coming from after logging hours
320 326 * Warn user that subprojects are also deleted when deleting a project
321 327 * Include subprojects versions on calendar and gantt
322 328 * Notify project members when a message is posted if they want to receive notifications
323 329 * Fixed: Feed content limit setting has no effect
324 330 * Fixed: Priorities not ordered when displayed as a filter in issue list
325 331 * Fixed: can not display attached images inline in message replies
326 332 * Fixed: Boards are not deleted when project is deleted
327 333 * Fixed: trying to preview a new issue raises an exception with postgresql
328 334 * Fixed: single file 'View difference' links do not work because of duplicate slashes in url
329 335 * Fixed: inline image not displayed when including a wiki page
330 336 * Fixed: CVS duplicate key violation
331 337 * Fixed: ActiveRecord::StaleObjectError exception on closing a set of circular duplicate issues
332 338 * Fixed: custom field filters behaviour
333 339 * Fixed: Postgresql 8.3 compatibility
334 340 * Fixed: Links to repository directories don't work
335 341
336 342
337 343 == 2008-03-29 v0.7.0-rc1
338 344
339 345 * Overall activity view and feed added, link is available on the project list
340 346 * Git VCS support
341 347 * Rails 2.0 sessions cookie store compatibility
342 348 * Use project identifiers in urls instead of ids
343 349 * Default configuration data can now be loaded from the administration screen
344 350 * Administration settings screen split to tabs (email notifications options moved to 'Settings')
345 351 * Project description is now unlimited and optional
346 352 * Wiki annotate view
347 353 * Escape HTML tag in textile content
348 354 * Add Redmine links to documents, versions, attachments and repository files
349 355 * New setting to specify how many objects should be displayed on paginated lists. There are 2 ways to select a set of issues on the issue list:
350 356 * by using checkbox and/or the little pencil that will select/unselect all issues
351 357 * by clicking on the rows (but not on the links), Ctrl and Shift keys can be used to select multiple issues
352 358 * Context menu disabled on links so that the default context menu of the browser is displayed when right-clicking on a link (click anywhere else on the row to display the context menu)
353 359 * User display format is now configurable in administration settings
354 360 * Issue list now supports bulk edit/move/delete (for a set of issues that belong to the same project)
355 361 * Merged 'change status', 'edit issue' and 'add note' actions:
356 362 * Users with 'edit issues' permission can now update any property including custom fields when adding a note or changing the status
357 363 * 'Change issue status' permission removed. To change an issue status, a user just needs to have either 'Edit' or 'Add note' permissions and some workflow transitions allowed
358 364 * Details by assignees on issue summary view
359 365 * 'New issue' link in the main menu (accesskey 7). The drop-down lists to add an issue on the project overview and the issue list are removed
360 366 * Change status select box default to current status
361 367 * Preview for issue notes, news and messages
362 368 * Optional description for attachments
363 369 * 'Fixed version' label changed to 'Target version'
364 370 * Let the user choose when deleting issues with reported hours to:
365 371 * delete the hours
366 372 * assign the hours to the project
367 373 * reassign the hours to another issue
368 374 * Date range filter and pagination on time entries detail view
369 375 * Propagate time tracking to the parent project
370 376 * Switch added on the project activity view to include subprojects
371 377 * Display total estimated and spent hours on the version detail view
372 378 * Weekly time tracking block for 'My page'
373 379 * Permissions to edit time entries
374 380 * Include subprojects on the issue list, calendar, gantt and timelog by default (can be turned off is administration settings)
375 381 * Roadmap enhancements (separate related issues from wiki contents, leading h1 in version wiki pages is hidden, smaller wiki headings)
376 382 * Make versions with same date sorted by name
377 383 * Allow issue list to be sorted by target version
378 384 * Related changesets messages displayed on the issue details view
379 385 * Create a journal and send an email when an issue is closed by commit
380 386 * Add 'Author' to the available columns for the issue list
381 387 * More appropriate default sort order on sortable columns
382 388 * Add issue subject to the time entries view and issue subject, description and tracker to the csv export
383 389 * Permissions to edit issue notes
384 390 * Display date/time instead of date on files list
385 391 * Do not show Roadmap menu item if the project doesn't define any versions
386 392 * Allow longer version names (60 chars)
387 393 * Ability to copy an existing workflow when creating a new role
388 394 * Display custom fields in two columns on the issue form
389 395 * Added 'estimated time' in the csv export of the issue list
390 396 * Display the last 30 days on the activity view rather than the current month (number of days can be configured in the application settings)
391 397 * Setting for whether new projects should be public by default
392 398 * User preference to choose how comments/replies are displayed: in chronological or reverse chronological order
393 399 * Added default value for custom fields
394 400 * Added tabindex property on wiki toolbar buttons (to easily move from field to field using the tab key)
395 401 * Redirect to issue page after creating a new issue
396 402 * Wiki toolbar improvements (mainly for Firefox)
397 403 * Display wiki syntax quick ref link on all wiki textareas
398 404 * Display links to Atom feeds
399 405 * Breadcrumb nav for the forums
400 406 * Show replies when choosing to display messages in the activity
401 407 * Added 'include' macro to include another wiki page
402 408 * RedmineWikiFormatting page available as a static HTML file locally
403 409 * Wrap diff content
404 410 * Strip out email address from authors in repository screens
405 411 * Highlight the current item of the main menu
406 412 * Added simple syntax highlighters for php and java languages
407 413 * Do not show empty diffs
408 414 * Show explicit error message when the scm command failed (eg. when svn binary is not available)
409 415 * Lithuanian translation added (Sergej Jegorov)
410 416 * Ukrainan translation added (Natalia Konovka & Mykhaylo Sorochan)
411 417 * Danish translation added (Mads Vestergaard)
412 418 * Added i18n support to the jstoolbar and various settings screen
413 419 * RedCloth's glyphs no longer user
414 420 * New icons for the wiki toolbar (from http://www.famfamfam.com/lab/icons/silk/)
415 421 * The following menus can now be extended by plugins: top_menu, account_menu, application_menu
416 422 * Added a simple rake task to fetch changesets from the repositories: rake redmine:fetch_changesets
417 423 * Remove hardcoded "Redmine" strings in account related emails and use application title instead
418 424 * Mantis importer preserve bug ids
419 425 * Trac importer: Trac guide wiki pages skipped
420 426 * Trac importer: wiki attachments migration added
421 427 * Trac importer: support database schema for Trac migration
422 428 * Trac importer: support CamelCase links
423 429 * Removes the Redmine version from the footer (can be viewed on admin -> info)
424 430 * Rescue and display an error message when trying to delete a role that is in use
425 431 * Add various 'X-Redmine' headers to email notifications: X-Redmine-Host, X-Redmine-Site, X-Redmine-Project, X-Redmine-Issue-Id, -Author, -Assignee, X-Redmine-Topic-Id
426 432 * Add "--encoding utf8" option to the Mercurial "hg log" command in order to get utf8 encoded commit logs
427 433 * Fixed: Gantt and calendar not properly refreshed (fragment caching removed)
428 434 * Fixed: Textile image with style attribute cause internal server error
429 435 * Fixed: wiki TOC not rendered properly when used in an issue or document description
430 436 * Fixed: 'has already been taken' error message on username and email fields if left empty
431 437 * Fixed: non-ascii attachement filename with IE
432 438 * Fixed: wrong url for wiki syntax pop-up when Redmine urls are prefixed
433 439 * Fixed: search for all words doesn't work
434 440 * Fixed: Do not show sticky and locked checkboxes when replying to a message
435 441 * Fixed: Mantis importer: do not duplicate Mantis username in firstname and lastname if realname is blank
436 442 * Fixed: Date custom fields not displayed as specified in application settings
437 443 * Fixed: titles not escaped in the activity view
438 444 * Fixed: issue queries can not use custom fields marked as 'for all projects' in a project context
439 445 * Fixed: on calendar, gantt and in the tracker filter on the issue list, only active trackers of the project (and its sub projects) should be available
440 446 * Fixed: locked users should not receive email notifications
441 447 * Fixed: custom field selection is not saved when unchecking them all on project settings
442 448 * Fixed: can not lock a topic when creating it
443 449 * Fixed: Incorrect filtering for unset values when using 'is not' filter
444 450 * Fixed: PostgreSQL issues_seq_id not updated when using Trac importer
445 451 * Fixed: ajax pagination does not scroll up
446 452 * Fixed: error when uploading a file with no content-type specified by the browser
447 453 * Fixed: wiki and changeset links not displayed when previewing issue description or notes
448 454 * Fixed: 'LdapError: no bind result' error when authenticating
449 455 * Fixed: 'LdapError: invalid binding information' when no username/password are set on the LDAP account
450 456 * Fixed: CVS repository doesn't work if port is used in the url
451 457 * Fixed: Email notifications: host name is missing in generated links
452 458 * Fixed: Email notifications: referenced changesets, wiki pages, attachments... are not turned into links
453 459 * Fixed: Do not clear issue relations when moving an issue to another project if cross-project issue relations are allowed
454 460 * Fixed: "undefined method 'textilizable'" error on email notification when running Repository#fetch_changesets from the console
455 461 * Fixed: Do not send an email with no recipient, cc or bcc
456 462 * Fixed: fetch_changesets fails on commit comments that close 2 duplicates issues.
457 463 * Fixed: Mercurial browsing under unix-like os and for directory depth > 2
458 464 * Fixed: Wiki links with pipe can not be used in wiki tables
459 465 * Fixed: migrate_from_trac doesn't import timestamps of wiki and tickets
460 466 * Fixed: when bulk editing, setting "Assigned to" to "nobody" causes an sql error with Postgresql
461 467
462 468
463 469 == 2008-03-12 v0.6.4
464 470
465 471 * Fixed: private projects name are displayed on account/show even if the current user doesn't have access to these private projects
466 472 * Fixed: potential LDAP authentication security flaw
467 473 * Fixed: context submenus on the issue list don't show up with IE6.
468 474 * Fixed: Themes are not applied with Rails 2.0
469 475 * Fixed: crash when fetching Mercurial changesets if changeset[:files] is nil
470 476 * Fixed: Mercurial repository browsing
471 477 * Fixed: undefined local variable or method 'log' in CvsAdapter when a cvs command fails
472 478 * Fixed: not null constraints not removed with Postgresql
473 479 * Doctype set to transitional
474 480
475 481
476 482 == 2007-12-18 v0.6.3
477 483
478 484 * Fixed: upload doesn't work in 'Files' section
479 485
480 486
481 487 == 2007-12-16 v0.6.2
482 488
483 489 * Search engine: issue custom fields can now be searched
484 490 * News comments are now textilized
485 491 * Updated Japanese translation (Satoru Kurashiki)
486 492 * Updated Chinese translation (Shortie Lo)
487 493 * Fixed Rails 2.0 compatibility bugs:
488 494 * Unable to create a wiki
489 495 * Gantt and calendar error
490 496 * Trac importer error (readonly? is defined by ActiveRecord)
491 497 * Fixed: 'assigned to me' filter broken
492 498 * Fixed: crash when validation fails on issue edition with no custom fields
493 499 * Fixed: reposman "can't find group" error
494 500 * Fixed: 'LDAP account password is too long' error when leaving the field empty on creation
495 501 * Fixed: empty lines when displaying repository files with Windows style eol
496 502 * Fixed: missing body closing tag in repository annotate and entry views
497 503
498 504
499 505 == 2007-12-10 v0.6.1
500 506
501 507 * Rails 2.0 compatibility
502 508 * Custom fields can now be displayed as columns on the issue list
503 509 * Added version details view (accessible from the roadmap)
504 510 * Roadmap: more accurate completion percentage calculation (done ratio of open issues is now taken into account)
505 511 * Added per-project tracker selection. Trackers can be selected on project settings
506 512 * Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums
507 513 * Forums: messages can now be edited/deleted (explicit permissions need to be given)
508 514 * Forums: topics can be locked so that no reply can be added
509 515 * Forums: topics can be marked as sticky so that they always appear at the top of the list
510 516 * Forums: attachments can now be added to replies
511 517 * Added time zone support
512 518 * Added a setting to choose the account activation strategy (available in application settings)
513 519 * Added 'Classic' theme (inspired from the v0.51 design)
514 520 * Added an alternate theme which provides issue list colorization based on issues priority
515 521 * Added Bazaar SCM adapter
516 522 * Added Annotate/Blame view in the repository browser (except for Darcs SCM)
517 523 * Diff style (inline or side by side) automatically saved as a user preference
518 524 * Added issues status changes on the activity view (by Cyril Mougel)
519 525 * Added forums topics on the activity view (disabled by default)
520 526 * Added an option on 'My account' for users who don't want to be notified of changes that they make
521 527 * Trac importer now supports mysql and postgresql databases
522 528 * Trac importer improvements (by Mat Trudel)
523 529 * 'fixed version' field can now be displayed on the issue list
524 530 * Added a couple of new formats for the 'date format' setting
525 531 * Added Traditional Chinese translation (by Shortie Lo)
526 532 * Added Russian translation (iGor kMeta)
527 533 * Project name format limitation removed (name can now contain any character)
528 534 * Project identifier maximum length changed from 12 to 20
529 535 * Changed the maximum length of LDAP account to 255 characters
530 536 * Removed the 12 characters limit on passwords
531 537 * Added wiki macros support
532 538 * Performance improvement on workflow setup screen
533 539 * More detailed html title on several views
534 540 * Custom fields can now be reordered
535 541 * Search engine: search can be restricted to an exact phrase by using quotation marks
536 542 * Added custom fields marked as 'For all projects' to the csv export of the cross project issue list
537 543 * Email notifications are now sent as Blind carbon copy by default
538 544 * Fixed: all members (including non active) should be deleted when deleting a project
539 545 * Fixed: Error on wiki syntax link (accessible from wiki/edit)
540 546 * Fixed: 'quick jump to a revision' form on the revisions list
541 547 * Fixed: error on admin/info if there's more than 1 plugin installed
542 548 * Fixed: svn or ldap password can be found in clear text in the html source in editing mode
543 549 * Fixed: 'Assigned to' drop down list is not sorted
544 550 * Fixed: 'View all issues' link doesn't work on issues/show
545 551 * Fixed: error on account/register when validation fails
546 552 * Fixed: Error when displaying the issue list if a float custom field is marked as 'used as filter'
547 553 * Fixed: Mercurial adapter breaks on missing :files entry in changeset hash (James Britt)
548 554 * Fixed: Wrong feed URLs on the home page
549 555 * Fixed: Update of time entry fails when the issue has been moved to an other project
550 556 * Fixed: Error when moving an issue without changing its tracker (Postgresql)
551 557 * Fixed: Changes not recorded when using :pserver string (CVS adapter)
552 558 * Fixed: admin should be able to move issues to any project
553 559 * Fixed: adding an attachment is not possible when changing the status of an issue
554 560 * Fixed: No mime-types in documents/files downloading
555 561 * Fixed: error when sorting the messages if there's only one board for the project
556 562 * Fixed: 'me' doesn't appear in the drop down filters on a project issue list.
557 563
558 564 == 2007-11-04 v0.6.0
559 565
560 566 * Permission model refactoring.
561 567 * Permissions: there are now 2 builtin roles that can be used to specify permissions given to other users than members of projects
562 568 * Permissions: some permissions (eg. browse the repository) can be removed for certain roles
563 569 * Permissions: modules (eg. issue tracking, news, documents...) can be enabled/disabled at project level
564 570 * Added Mantis and Trac importers
565 571 * New application layout
566 572 * Added "Bulk edit" functionality on the issue list
567 573 * More flexible mail notifications settings at user level
568 574 * Added AJAX based context menu on the project issue list that provide shortcuts for editing, re-assigning, changing the status or the priority, moving or deleting an issue
569 575 * Added the hability to copy an issue. It can be done from the "issue/show" view or from the context menu on the issue list
570 576 * Added the ability to customize issue list columns (at application level or for each saved query)
571 577 * Overdue versions (date reached and open issues > 0) are now always displayed on the roadmap
572 578 * Added the ability to rename wiki pages (specific permission required)
573 579 * Search engines now supports pagination. Results are sorted in reverse chronological order
574 580 * Added "Estimated hours" attribute on issues
575 581 * A category with assigned issue can now be deleted. 2 options are proposed: remove assignments or reassign issues to another category
576 582 * Forum notifications are now also sent to the authors of the thread, even if they don�t watch the board
577 583 * Added an application setting to specify the application protocol (http or https) used to generate urls in emails
578 584 * Gantt chart: now starts at the current month by default
579 585 * Gantt chart: month count and zoom factor are automatically saved as user preferences
580 586 * Wiki links can now refer to other project wikis
581 587 * Added wiki index by date
582 588 * Added preview on add/edit issue form
583 589 * Emails footer can now be customized from the admin interface (Admin -> Email notifications)
584 590 * Default encodings for repository files can now be set in application settings (used to convert files content and diff to UTF-8 so that they�re properly displayed)
585 591 * Calendar: first day of week can now be set in lang files
586 592 * Automatic closing of duplicate issues
587 593 * Added a cross-project issue list
588 594 * AJAXified the SCM browser (tree view)
589 595 * Pretty URL for the repository browser (Cyril Mougel)
590 596 * Search engine: added a checkbox to search titles only
591 597 * Added "% done" in the filter list
592 598 * Enumerations: values can now be reordered and a default value can be specified (eg. default issue priority)
593 599 * Added some accesskeys
594 600 * Added "Float" as a custom field format
595 601 * Added basic Theme support
596 602 * Added the ability to set the �done ratio� of issues fixed by commit (Nikolay Solakov)
597 603 * Added custom fields in issue related mail notifications
598 604 * Email notifications are now sent in plain text and html
599 605 * Gantt chart can now be exported to a graphic file (png). This functionality is only available if RMagick is installed.
600 606 * Added syntax highlightment for repository files and wiki
601 607 * Improved automatic Redmine links
602 608 * Added automatic table of content support on wiki pages
603 609 * Added radio buttons on the documents list to sort documents by category, date, title or author
604 610 * Added basic plugin support, with a sample plugin
605 611 * Added a link to add a new category when creating or editing an issue
606 612 * Added a "Assignable" boolean on the Role model. If unchecked, issues can not be assigned to users having this role.
607 613 * Added an option to be able to relate issues in different projects
608 614 * Added the ability to move issues (to another project) without changing their trackers.
609 615 * Atom feeds added on project activity, news and changesets
610 616 * Added the ability to reset its own RSS access key
611 617 * Main project list now displays root projects with their subprojects
612 618 * Added anchor links to issue notes
613 619 * Added reposman Ruby version. This script can now register created repositories in Redmine (Nicolas Chuche)
614 620 * Issue notes are now included in search
615 621 * Added email sending test functionality
616 622 * Added LDAPS support for LDAP authentication
617 623 * Removed hard-coded URLs in mail templates
618 624 * Subprojects are now grouped by projects in the navigation drop-down menu
619 625 * Added a new value for date filters: this week
620 626 * Added cache for application settings
621 627 * Added Polish translation (Tomasz Gawryl)
622 628 * Added Czech translation (Jan Kadlecek)
623 629 * Added Romanian translation (Csongor Bartus)
624 630 * Added Hebrew translation (Bob Builder)
625 631 * Added Serbian translation (Dragan Matic)
626 632 * Added Korean translation (Choi Jong Yoon)
627 633 * Fixed: the link to delete issue relations is displayed even if the user is not authorized to delete relations
628 634 * Performance improvement on calendar and gantt
629 635 * Fixed: wiki preview doesn�t work on long entries
630 636 * Fixed: queries with multiple custom fields return no result
631 637 * Fixed: Can not authenticate user against LDAP if its DN contains non-ascii characters
632 638 * Fixed: URL with ~ broken in wiki formatting
633 639 * Fixed: some quotation marks are rendered as strange characters in pdf
634 640
635 641
636 642 == 2007-07-15 v0.5.1
637 643
638 644 * per project forums added
639 645 * added the ability to archive projects
640 646 * added �Watch� functionality on issues. It allows users to receive notifications about issue changes
641 647 * custom fields for issues can now be used as filters on issue list
642 648 * added per user custom queries
643 649 * commit messages are now scanned for referenced or fixed issue IDs (keywords defined in Admin -> Settings)
644 650 * projects list now shows the list of public projects and private projects for which the user is a member
645 651 * versions can now be created with no date
646 652 * added issue count details for versions on Reports view
647 653 * added time report, by member/activity/tracker/version and year/month/week for the selected period
648 654 * each category can now be associated to a user, so that new issues in that category are automatically assigned to that user
649 655 * added autologin feature (disabled by default)
650 656 * optimistic locking added for wiki edits
651 657 * added wiki diff
652 658 * added the ability to destroy wiki pages (requires permission)
653 659 * a wiki page can now be attached to each version, and displayed on the roadmap
654 660 * attachments can now be added to wiki pages (original patch by Pavol Murin) and displayed online
655 661 * added an option to see all versions in the roadmap view (including completed ones)
656 662 * added basic issue relations
657 663 * added the ability to log time when changing an issue status
658 664 * account information can now be sent to the user when creating an account
659 665 * author and assignee of an issue always receive notifications (even if they turned of mail notifications)
660 666 * added a quick search form in page header
661 667 * added 'me' value for 'assigned to' and 'author' query filters
662 668 * added a link on revision screen to see the entire diff for the revision
663 669 * added last commit message for each entry in repository browser
664 670 * added the ability to view a file diff with free to/from revision selection.
665 671 * text files can now be viewed online when browsing the repository
666 672 * added basic support for other SCM: CVS (Ralph Vater), Mercurial and Darcs
667 673 * added fragment caching for svn diffs
668 674 * added fragment caching for calendar and gantt views
669 675 * login field automatically focused on login form
670 676 * subproject name displayed on issue list, calendar and gantt
671 677 * added an option to choose the date format: language based or ISO 8601
672 678 * added a simple mail handler. It lets users add notes to an existing issue by replying to the initial notification email.
673 679 * a 403 error page is now displayed (instead of a blank page) when trying to access a protected page
674 680 * added portuguese translation (Joao Carlos Clementoni)
675 681 * added partial online help japanese translation (Ken Date)
676 682 * added bulgarian translation (Nikolay Solakov)
677 683 * added dutch translation (Linda van den Brink)
678 684 * added swedish translation (Thomas Habets)
679 685 * italian translation update (Alessio Spadaro)
680 686 * japanese translation update (Satoru Kurashiki)
681 687 * fixed: error on history atom feed when there�s no notes on an issue change
682 688 * fixed: error in journalizing an issue with longtext custom fields (Postgresql)
683 689 * fixed: creation of Oracle schema
684 690 * fixed: last day of the month not included in project activity
685 691 * fixed: files with an apostrophe in their names can't be accessed in SVN repository
686 692 * fixed: performance issue on RepositoriesController#revisions when a changeset has a great number of changes (eg. 100,000)
687 693 * fixed: open/closed issue counts are always 0 on reports view (postgresql)
688 694 * fixed: date query filters (wrong results and sql error with postgresql)
689 695 * fixed: confidentiality issue on account/show (private project names displayed to anyone)
690 696 * fixed: Long text custom fields displayed without line breaks
691 697 * fixed: Error when editing the wokflow after deleting a status
692 698 * fixed: SVN commit dates are now stored as local time
693 699
694 700
695 701 == 2007-04-11 v0.5.0
696 702
697 703 * added per project Wiki
698 704 * added rss/atom feeds at project level (custom queries can be used as feeds)
699 705 * added search engine (search in issues, news, commits, wiki pages, documents)
700 706 * simple time tracking functionality added
701 707 * added version due dates on calendar and gantt
702 708 * added subprojects issue count on project Reports page
703 709 * added the ability to copy an existing workflow when creating a new tracker
704 710 * added the ability to include subprojects on calendar and gantt
705 711 * added the ability to select trackers to display on calendar and gantt (Jeffrey Jones)
706 712 * added side by side svn diff view (Cyril Mougel)
707 713 * added back subproject filter on issue list
708 714 * added permissions report in admin area
709 715 * added a status filter on users list
710 716 * support for password-protected SVN repositories
711 717 * SVN commits are now stored in the database
712 718 * added simple svn statistics SVG graphs
713 719 * progress bars for roadmap versions (Nick Read)
714 720 * issue history now shows file uploads and deletions
715 721 * #id patterns are turned into links to issues in descriptions and commit messages
716 722 * japanese translation added (Satoru Kurashiki)
717 723 * chinese simplified translation added (Andy Wu)
718 724 * italian translation added (Alessio Spadaro)
719 725 * added scripts to manage SVN repositories creation and user access control using ssh+svn (Nicolas Chuche)
720 726 * better calendar rendering time
721 727 * fixed migration scripts to work with mysql 5 running in strict mode
722 728 * fixed: error when clicking "add" with no block selected on my/page_layout
723 729 * fixed: hard coded links in navigation bar
724 730 * fixed: table_name pre/suffix support
725 731
726 732
727 733 == 2007-02-18 v0.4.2
728 734
729 735 * Rails 1.2 is now required
730 736 * settings are now stored in the database and editable through the application in: Admin -> Settings (config_custom.rb is no longer used)
731 737 * added project roadmap view
732 738 * mail notifications added when a document, a file or an attachment is added
733 739 * tooltips added on Gantt chart and calender to view the details of the issues
734 740 * ability to set the sort order for roles, trackers, issue statuses
735 741 * added missing fields to csv export: priority, start date, due date, done ratio
736 742 * added total number of issues per tracker on project overview
737 743 * all icons replaced (new icons are based on GPL icon set: "KDE Crystal Diamond 2.5" -by paolino- and "kNeu! Alpha v0.1" -by Pablo Fabregat-)
738 744 * added back "fixed version" field on issue screen and in filters
739 745 * project settings screen split in 4 tabs
740 746 * custom fields screen split in 3 tabs (one for each kind of custom field)
741 747 * multiple issues pdf export now rendered as a table
742 748 * added a button on users/list to manually activate an account
743 749 * added a setting option to disable "password lost" functionality
744 750 * added a setting option to set max number of issues in csv/pdf exports
745 751 * fixed: subprojects count is always 0 on projects list
746 752 * fixed: locked users are proposed when adding a member to a project
747 753 * fixed: setting an issue status as default status leads to an sql error with SQLite
748 754 * fixed: unable to delete an issue status even if it's not used yet
749 755 * fixed: filters ignored when exporting a predefined query to csv/pdf
750 756 * fixed: crash when french "issue_edit" email notification is sent
751 757 * fixed: hide mail preference not saved (my/account)
752 758 * fixed: crash when a new user try to edit its "my page" layout
753 759
754 760
755 761 == 2007-01-03 v0.4.1
756 762
757 763 * fixed: emails have no recipient when one of the project members has notifications disabled
758 764
759 765
760 766 == 2007-01-02 v0.4.0
761 767
762 768 * simple SVN browser added (just needs svn binaries in PATH)
763 769 * comments can now be added on news
764 770 * "my page" is now customizable
765 771 * more powerfull and savable filters for issues lists
766 772 * improved issues change history
767 773 * new functionality: move an issue to another project or tracker
768 774 * new functionality: add a note to an issue
769 775 * new report: project activity
770 776 * "start date" and "% done" fields added on issues
771 777 * project calendar added
772 778 * gantt chart added (exportable to pdf)
773 779 * single/multiple issues pdf export added
774 780 * issues reports improvements
775 781 * multiple file upload for issues, documents and files
776 782 * option to set maximum size of uploaded files
777 783 * textile formating of issue and news descritions (RedCloth required)
778 784 * integration of DotClear jstoolbar for textile formatting
779 785 * calendar date picker for date fields (LGPL DHTML Calendar http://sourceforge.net/projects/jscalendar)
780 786 * new filter in issues list: Author
781 787 * ajaxified paginators
782 788 * news rss feed added
783 789 * option to set number of results per page on issues list
784 790 * localized csv separator (comma/semicolon)
785 791 * csv output encoded to ISO-8859-1
786 792 * user custom field displayed on account/show
787 793 * default configuration improved (default roles, trackers, status, permissions and workflows)
788 794 * language for default configuration data can now be chosen when running 'load_default_data' task
789 795 * javascript added on custom field form to show/hide fields according to the format of custom field
790 796 * fixed: custom fields not in csv exports
791 797 * fixed: project settings now displayed according to user's permissions
792 798 * fixed: application error when no version is selected on projects/add_file
793 799 * fixed: public actions not authorized for members of non public projects
794 800 * fixed: non public projects were shown on welcome screen even if current user is not a member
795 801
796 802
797 803 == 2006-10-08 v0.3.0
798 804
799 805 * user authentication against multiple LDAP (optional)
800 806 * token based "lost password" functionality
801 807 * user self-registration functionality (optional)
802 808 * custom fields now available for issues, users and projects
803 809 * new custom field format "text" (displayed as a textarea field)
804 810 * project & administration drop down menus in navigation bar for quicker access
805 811 * text formatting is preserved for long text fields (issues, projects and news descriptions)
806 812 * urls and emails are turned into clickable links in long text fields
807 813 * "due date" field added on issues
808 814 * tracker selection filter added on change log
809 815 * Localization plugin replaced with GLoc 1.1.0 (iconv required)
810 816 * error messages internationalization
811 817 * german translation added (thanks to Karim Trott)
812 818 * data locking for issues to prevent update conflicts (using ActiveRecord builtin optimistic locking)
813 819 * new filter in issues list: "Fixed version"
814 820 * active filters are displayed with colored background on issues list
815 821 * custom configuration is now defined in config/config_custom.rb
816 822 * user object no more stored in session (only user_id)
817 823 * news summary field is no longer required
818 824 * tables and forms redesign
819 825 * Fixed: boolean custom field not working
820 826 * Fixed: error messages for custom fields are not displayed
821 827 * Fixed: invalid custom fields should have a red border
822 828 * Fixed: custom fields values are not validated on issue update
823 829 * Fixed: unable to choose an empty value for 'List' custom fields
824 830 * Fixed: no issue categories sorting
825 831 * Fixed: incorrect versions sorting
826 832
827 833
828 834 == 2006-07-12 - v0.2.2
829 835
830 836 * Fixed: bug in "issues list"
831 837
832 838
833 839 == 2006-07-09 - v0.2.1
834 840
835 841 * new databases supported: Oracle, PostgreSQL, SQL Server
836 842 * projects/subprojects hierarchy (1 level of subprojects only)
837 843 * environment information display in admin/info
838 844 * more filter options in issues list (rev6)
839 845 * default language based on browser settings (Accept-Language HTTP header)
840 846 * issues list exportable to CSV (rev6)
841 847 * simple_format and auto_link on long text fields
842 848 * more data validations
843 849 * Fixed: error when all mail notifications are unchecked in admin/mail_options
844 850 * Fixed: all project news are displayed on project summary
845 851 * Fixed: Can't change user password in users/edit
846 852 * Fixed: Error on tables creation with PostgreSQL (rev5)
847 853 * Fixed: SQL error in "issue reports" view with PostgreSQL (rev5)
848 854
849 855
850 856 == 2006-06-25 - v0.1.0
851 857
852 858 * multiple users/multiple projects
853 859 * role based access control
854 860 * issue tracking system
855 861 * fully customizable workflow
856 862 * documents/files repository
857 863 * email notifications on issue creation and update
858 864 * multilanguage support (except for error messages):english, french, spanish
859 865 * online manual in french (unfinished)
@@ -1,72 +1,88
1 1 # redMine - project management software
2 2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.dirname(__FILE__) + '/../test_helper'
19 19 require 'users_controller'
20 20
21 21 # Re-raise errors caught by the controller.
22 22 class UsersController; def rescue_action(e) raise e end; end
23 23
24 24 class UsersControllerTest < Test::Unit::TestCase
25 25 fixtures :users, :projects, :members
26 26
27 27 def setup
28 28 @controller = UsersController.new
29 29 @request = ActionController::TestRequest.new
30 30 @response = ActionController::TestResponse.new
31 31 User.current = nil
32 32 @request.session[:user_id] = 1 # admin
33 33 end
34 34
35 35 def test_index
36 36 get :index
37 37 assert_response :success
38 38 assert_template 'list'
39 39 end
40 40
41 41 def test_list
42 42 get :list
43 43 assert_response :success
44 44 assert_template 'list'
45 45 assert_not_nil assigns(:users)
46 46 # active users only
47 47 assert_nil assigns(:users).detect {|u| !u.active?}
48 48 end
49 49
50 50 def test_list_with_name_filter
51 51 get :list, :name => 'john'
52 52 assert_response :success
53 53 assert_template 'list'
54 54 users = assigns(:users)
55 55 assert_not_nil users
56 56 assert_equal 1, users.size
57 57 assert_equal 'John', users.first.firstname
58 58 end
59 59
60 60 def test_edit_membership
61 61 post :edit_membership, :id => 2, :membership_id => 1,
62 62 :membership => { :role_id => 2}
63 63 assert_redirected_to 'users/edit/2'
64 64 assert_equal 2, Member.find(1).role_id
65 65 end
66 66
67 def test_edit_with_activation_should_send_a_notification
68 u = User.new(:firstname => 'Foo', :lastname => 'Bar', :mail => 'foo.bar@somenet.foo', :language => 'fr')
69 u.login = 'foo'
70 u.status = User::STATUS_REGISTERED
71 u.save!
72 ActionMailer::Base.deliveries.clear
73 Setting.bcc_recipients = '1'
74
75 post :edit, :id => u.id, :user => {:status => User::STATUS_ACTIVE}
76 assert u.reload.active?
77 mail = ActionMailer::Base.deliveries.last
78 assert_not_nil mail
79 assert_equal ['foo.bar@somenet.foo'], mail.bcc
80 assert mail.body.include?(ll('fr', :notice_account_activated))
81 end
82
67 83 def test_destroy_membership
68 84 post :destroy_membership, :id => 2, :membership_id => 1
69 85 assert_redirected_to 'users/edit/2'
70 86 assert_nil Member.find_by_id(1)
71 87 end
72 88 end
@@ -1,159 +1,164
1 1 # redMine - project management software
2 2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.dirname(__FILE__) + '/../test_helper'
19 19
20 20 class MailHandlerTest < Test::Unit::TestCase
21 21 fixtures :users, :projects,
22 22 :enabled_modules,
23 23 :roles,
24 24 :members,
25 25 :issues,
26 26 :issue_statuses,
27 27 :workflows,
28 28 :trackers,
29 29 :projects_trackers,
30 30 :enumerations,
31 31 :issue_categories,
32 32 :custom_fields,
33 33 :custom_fields_trackers
34 34
35 35 FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler'
36 36
37 37 def setup
38 38 ActionMailer::Base.deliveries.clear
39 39 end
40 40
41 41 def test_add_issue
42 42 # This email contains: 'Project: onlinestore'
43 43 issue = submit_email('ticket_on_given_project.eml')
44 44 assert issue.is_a?(Issue)
45 45 assert !issue.new_record?
46 46 issue.reload
47 47 assert_equal 'New ticket on a given project', issue.subject
48 48 assert_equal User.find_by_login('jsmith'), issue.author
49 49 assert_equal Project.find(2), issue.project
50 assert_equal IssueStatus.find_by_name('Resolved'), issue.status
50 51 assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.')
52 # keywords should be removed from the email body
53 assert !issue.description.match(/^Project:/i)
54 assert !issue.description.match(/^Status:/i)
51 55 end
52 56
53 57 def test_add_issue_with_status
54 58 # This email contains: 'Project: onlinestore' and 'Status: Resolved'
55 59 issue = submit_email('ticket_on_given_project.eml')
56 60 assert issue.is_a?(Issue)
57 61 assert !issue.new_record?
58 62 issue.reload
59 63 assert_equal Project.find(2), issue.project
60 64 assert_equal IssueStatus.find_by_name("Resolved"), issue.status
61 65 end
62 66
63 67 def test_add_issue_with_attributes_override
64 68 issue = submit_email('ticket_with_attributes.eml', :allow_override => 'tracker,category,priority')
65 69 assert issue.is_a?(Issue)
66 70 assert !issue.new_record?
67 71 issue.reload
68 72 assert_equal 'New ticket on a given project', issue.subject
69 73 assert_equal User.find_by_login('jsmith'), issue.author
70 74 assert_equal Project.find(2), issue.project
71 75 assert_equal 'Feature request', issue.tracker.to_s
72 76 assert_equal 'Stock management', issue.category.to_s
73 77 assert_equal 'Urgent', issue.priority.to_s
74 78 assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.')
75 79 end
76 80
77 81 def test_add_issue_with_partial_attributes_override
78 82 issue = submit_email('ticket_with_attributes.eml', :issue => {:priority => 'High'}, :allow_override => ['tracker'])
79 83 assert issue.is_a?(Issue)
80 84 assert !issue.new_record?
81 85 issue.reload
82 86 assert_equal 'New ticket on a given project', issue.subject
83 87 assert_equal User.find_by_login('jsmith'), issue.author
84 88 assert_equal Project.find(2), issue.project
85 89 assert_equal 'Feature request', issue.tracker.to_s
86 90 assert_nil issue.category
87 91 assert_equal 'High', issue.priority.to_s
88 92 assert issue.description.include?('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.')
89 93 end
90 94
91 95 def test_add_issue_with_attachment_to_specific_project
92 96 issue = submit_email('ticket_with_attachment.eml', :issue => {:project => 'onlinestore'})
93 97 assert issue.is_a?(Issue)
94 98 assert !issue.new_record?
95 99 issue.reload
96 100 assert_equal 'Ticket created by email with attachment', issue.subject
97 101 assert_equal User.find_by_login('jsmith'), issue.author
98 102 assert_equal Project.find(2), issue.project
99 103 assert_equal 'This is a new ticket with attachments', issue.description
100 104 # Attachment properties
101 105 assert_equal 1, issue.attachments.size
102 106 assert_equal 'Paella.jpg', issue.attachments.first.filename
103 107 assert_equal 'image/jpeg', issue.attachments.first.content_type
104 108 assert_equal 10790, issue.attachments.first.filesize
105 109 end
106 110
107 111 def test_add_issue_with_custom_fields
108 112 issue = submit_email('ticket_with_custom_fields.eml', :issue => {:project => 'onlinestore'})
109 113 assert issue.is_a?(Issue)
110 114 assert !issue.new_record?
111 115 issue.reload
112 116 assert_equal 'New ticket with custom field values', issue.subject
113 117 assert_equal 'Value for a custom field', issue.custom_value_for(CustomField.find_by_name('Searchable field')).value
118 assert !issue.description.match(/^searchable field:/i)
114 119 end
115 120
116 121 def test_add_issue_with_cc
117 122 issue = submit_email('ticket_with_cc.eml', :issue => {:project => 'ecookbook'})
118 123 assert issue.is_a?(Issue)
119 124 assert !issue.new_record?
120 125 issue.reload
121 126 assert issue.watched_by?(User.find_by_mail('dlopper@somenet.foo'))
122 127 assert_equal 1, issue.watchers.size
123 128 end
124 129
125 130 def test_add_issue_note
126 131 journal = submit_email('ticket_reply.eml')
127 132 assert journal.is_a?(Journal)
128 133 assert_equal User.find_by_login('jsmith'), journal.user
129 134 assert_equal Issue.find(2), journal.journalized
130 135 assert_match /This is reply/, journal.notes
131 136 end
132 137
133 138 def test_add_issue_note_with_status_change
134 139 # This email contains: 'Status: Resolved'
135 140 journal = submit_email('ticket_reply_with_status.eml')
136 141 assert journal.is_a?(Journal)
137 142 issue = Issue.find(journal.issue.id)
138 143 assert_equal User.find_by_login('jsmith'), journal.user
139 144 assert_equal Issue.find(2), journal.journalized
140 145 assert_match /This is reply/, journal.notes
141 146 assert_equal IssueStatus.find_by_name("Resolved"), issue.status
142 147 end
143 148
144 149 def test_should_strip_tags_of_html_only_emails
145 150 issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecookbook'})
146 151 assert issue.is_a?(Issue)
147 152 assert !issue.new_record?
148 153 issue.reload
149 154 assert_equal 'HTML email', issue.subject
150 155 assert_equal 'This is a html-only email.', issue.description
151 156 end
152 157
153 158 private
154 159
155 160 def submit_email(filename, options={})
156 161 raw = IO.read(File.join(FIXTURES_PATH, filename))
157 162 MailHandler.receive(raw, options)
158 163 end
159 164 end
General Comments 0
You need to be logged in to leave comments. Login now