<% i = 0 %>
-<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
+<% split_on = (@issue.editable_custom_field_values.size / 2.0).ceil - 1 %>
<% @issue.editable_custom_field_values.each do |value| %>
<%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %>
<% if i == split_on -%>
Index: app/views/mailer/issue_edit.html.erb
===================================================================
--- app/views/mailer/issue_edit.html.erb (revision 11293)
+++ app/views/mailer/issue_edit.html.erb (working copy)
@@ -1,11 +1,11 @@
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %>
-<% details_to_strings(@journal.details, false, :only_path => false).each do |string| %>
+<% details_to_strings(@journal.details, false, :only_path => false, :user => @auser).each do |string| %>
- <%= string %>
<% end %>
<%= textilizable(@journal, :notes, :only_path => false) %>
-<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
+<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url, :user => @auser } %>
Index: app/views/mailer/_issue.text.erb
===================================================================
--- app/views/mailer/_issue.text.erb (revision 11293)
+++ app/views/mailer/_issue.text.erb (working copy)
@@ -2,12 +2,25 @@
<%= issue_url %>
* <%=l(:field_author)%>: <%= issue.author %>
+<% unless issue.hidden_attribute?('status', user) %>
* <%=l(:field_status)%>: <%= issue.status %>
+<% end %>
+<% unless issue.hidden_attribute?('priority', user) %>
* <%=l(:field_priority)%>: <%= issue.priority %>
+<% end %>
+<% unless issue.disabled_core_fields.include?('assigned_to_id') || issue.hidden_attribute?('assigned_to_id', user) %>
* <%=l(:field_assigned_to)%>: <%= issue.assigned_to %>
+<% end %>
+<% unless issue.disabled_core_fields.include?('category_id') || issue.hidden_attribute?('category_id', user) %>
* <%=l(:field_category)%>: <%= issue.category %>
+<% end %>
+<% unless issue.disabled_core_fields.include?('fixed_version_id') || issue.hidden_attribute?('fixed_version_id', user) %>
* <%=l(:field_fixed_version)%>: <%= issue.fixed_version %>
-<% issue.custom_field_values.each do |c| %>* <%= c.custom_field.name %>: <%= show_value(c) %>
+<% end %>
+<% issue.custom_field_values.each do |c| %>
+<% unless issue.hidden_attribute?(c.custom_field.id, user) %>
+* <%= c.custom_field.name %>: <%= show_value(c) %>
+<% end %>
<% end -%>
----------------------------------------
<%= issue.description %>
Index: app/views/mailer/issue_add.text.erb
===================================================================
--- app/views/mailer/issue_add.text.erb (revision 11293)
+++ app/views/mailer/issue_add.text.erb (working copy)
@@ -1,4 +1,4 @@
<%= l(:text_issue_added, :id => "##{@issue.id}", :author => @issue.author) %>
----------------------------------------
-<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
+<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url, :user => @auser } %>
Index: app/views/mailer/_issue.html.erb
===================================================================
--- app/views/mailer/_issue.html.erb (revision 11293)
+++ app/views/mailer/_issue.html.erb (working copy)
@@ -2,13 +2,25 @@
- <%=l(:field_author)%>: <%=h issue.author %>
-- <%=l(:field_status)%>: <%=h issue.status %>
-- <%=l(:field_priority)%>: <%=h issue.priority %>
-- <%=l(:field_assigned_to)%>: <%=h issue.assigned_to %>
-- <%=l(:field_category)%>: <%=h issue.category %>
-- <%=l(:field_fixed_version)%>: <%=h issue.fixed_version %>
+<% unless issue.hidden_attribute?('status', user) %>
+ - <%=l(:field_status)%>: <%=h issue.status %>
+<% end %>
+<% unless issue.hidden_attribute?('priority', user) %>
+ - <%=l(:field_priority)%>: <%=h issue.priority %>
+<% end %>
+<% unless issue.disabled_core_fields.include?('assigned_to_id') || issue.hidden_attribute?('assigned_to_id', user) %>
+ - <%=l(:field_assigned_to)%>: <%=h issue.assigned_to %>
+<% end %>
+<% unless issue.disabled_core_fields.include?('category_id') || issue.hidden_attribute?('category_id', user) %>
+ - <%=l(:field_category)%>: <%=h issue.category %>
+<% end %>
+<% unless issue.disabled_core_fields.include?('fixed_version_id') || issue.hidden_attribute?('fixed_version_id', user) %>
+ - <%=l(:field_fixed_version)%>: <%=h issue.fixed_version %>
+<% end %>
<% issue.custom_field_values.each do |c| %>
- - <%=h c.custom_field.name %>: <%=h show_value(c) %>
+ <% unless issue.hidden_attribute?(c.custom_field.id, user) %>
+ - <%=h c.custom_field.name %>: <%=h show_value(c) %>
+ <% end %>
<% end %>
Index: app/views/mailer/issue_add.html.erb
===================================================================
--- app/views/mailer/issue_add.html.erb (revision 11293)
+++ app/views/mailer/issue_add.html.erb (working copy)
@@ -1,3 +1,3 @@
<%= l(:text_issue_added, :id => "##{@issue.id}", :author => h(@issue.author)) %>
-<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
+<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url, :user => @auser } %>
Index: app/views/mailer/issue_edit.text.erb
===================================================================
--- app/views/mailer/issue_edit.text.erb (revision 11293)
+++ app/views/mailer/issue_edit.text.erb (working copy)
@@ -1,6 +1,6 @@
<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %>
-<% details_to_strings(@journal.details, true).each do |string| -%>
+<% details_to_strings(@journal.details, true, :user => @auser).each do |string| -%>
<%= string %>
<% end -%>
@@ -9,4 +9,4 @@
<% end -%>
----------------------------------------
-<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
+<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url, :user => @auser } %>
Index: lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
===================================================================
--- lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb (revision 11293)
+++ lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb (working copy)
@@ -81,6 +81,17 @@
notified_watchers.collect(&:mail)
end
+ # Returns an array of watchers
+ def watcher_recipient_users
+ notified = watcher_users.active
+ notified.reject! {|user| user.mail_notification == 'none'}
+
+ if respond_to?(:visible?)
+ notified.reject! {|user| !visible?(user)}
+ end
+ notified
+ end
+
module ClassMethods; end
end
end