Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#603 #604 Fixed issues with mailer_extended.rb and with badly-formed …
…HTML
- Loading branch information
Showing
56 changed files
with
673 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
OVERVIEW | ||
|
||
The purpose of the Arch Decision plugin for Redmine is to allow teams to collaborate on project decisions (primarily technical ones), | ||
to encourage explicit statements of assumptions and prioritizations, and to provide tracking after the decision has been made so that | ||
teams can have a collective memory as to how decisions were made in the past. | ||
|
||
VERSION: 0.0.9 | ||
|
||
RELEASE NOTES | ||
|
||
* Bug #598 - Labels missing for Redmine 0.9.2 | ||
* Feature #596 - Add support for Redmine version 0.9: The plugin is now compatible with Redmine "trunk" (0.9.2). A separate branch has been created for the 0.8.4-compatible version. | ||
|
||
CURRENT FEATURES | ||
|
||
* List Arch Decisions (currently only manually, via the /arch_decisions URL) | ||
* List Factors (currently only manually, via the /factors URL) | ||
* CRUD Arch Decisions (with only basic info) | ||
* CRUD Factors (with only basic info) | ||
* Associate Factors with ADs, and remove associations | ||
* Reorder factor priorities for each AD | ||
* List and CRUD Arch Decision Strategies | ||
* Arch Decisions, Factors and Strategies each have their own Discussion section | ||
* Project members and watchers receive email notifications for significant Arch Decision events | ||
* Simple security model (using Redmine security) for enabling the creation and modification of ADs and related entities | ||
* Can link ADs to Issues | ||
|
||
ROADMAP | ||
|
||
* Allow tagging of ADs and Factors for easy and flexible categorization and search | ||
* Enable full-fledged search across all model types | ||
* Allow changes to ADs to show up in the Activity list | ||
|
||
KNOWN ISSUES | ||
|
||
Note: there is now an official issue tracker for this plug-in. Please refer to http://opensource.integritas.com.br/projects/redmine-ad/issues for the complete list. | ||
|
||
################################ | ||
# Issue #1 | ||
# [timothy.high@gmail.com] | ||
# There is a problem in development mode with classes reloading / not reloading | ||
# It shows up as errors in the web page such as: | ||
# Project(#51730400) expected, got Project(#50128210) | ||
# For more information, see http://dev.rubyonrails.org/ticket/8246 | ||
################################ | ||
|
||
A number of solutions are recommended in the ticket above. Of all the ones recommended (there are several changes to environment.rb), the only one | ||
that worked was to patch association_proxy.rb. For more info, see: | ||
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d2adc451ff0236c2/b95a3bc9cb97f988?#b95a3bc9cb97f988 | ||
|
||
UPDATE: Unfortunately, this hasn't solved the problem. It seems that not only have the exact class representation changed, but whole | ||
methods have gone missing from the newly loaded versions! The only workaround left for me has been to run my local server in production mode. | ||
|
||
OVERVIEW | ||
The purpose of the Arch Decision plugin for Redmine is to allow teams to collaborate on project decisions (primarily technical ones), | ||
to encourage explicit statements of assumptions and prioritizations, and to provide tracking after the decision has been made so that | ||
teams can have a collective memory as to how decisions were made in the past. | ||
VERSION: 0.0.9 | ||
RELEASE NOTES | ||
* Bug #598 - Labels missing for Redmine 0.9.2 | ||
* Feature #596 - Add support for Redmine version 0.9: The plugin is now compatible with Redmine "trunk" (0.9.2). A separate branch has been created for the 0.8.4-compatible version. | ||
CURRENT FEATURES | ||
* List Arch Decisions (currently only manually, via the /arch_decisions URL) | ||
* List Factors (currently only manually, via the /factors URL) | ||
* CRUD Arch Decisions (with only basic info) | ||
* CRUD Factors (with only basic info) | ||
* Associate Factors with ADs, and remove associations | ||
* Reorder factor priorities for each AD | ||
* List and CRUD Arch Decision Strategies | ||
* Arch Decisions, Factors and Strategies each have their own Discussion section | ||
* Project members and watchers receive email notifications for significant Arch Decision events | ||
* Simple security model (using Redmine security) for enabling the creation and modification of ADs and related entities | ||
* Can link ADs to Issues | ||
ROADMAP | ||
* Allow tagging of ADs and Factors for easy and flexible categorization and search | ||
* Enable full-fledged search across all model types | ||
* Allow changes to ADs to show up in the Activity list | ||
KNOWN ISSUES | ||
Note: there is now an official issue tracker for this plug-in. Please refer to http://opensource.integritas.com.br/projects/redmine-ad/issues for the complete list. | ||
################################ | ||
# Issue #1 | ||
# [timothy.high@gmail.com] | ||
# There is a problem in development mode with classes reloading / not reloading | ||
# It shows up as errors in the web page such as: | ||
# Project(#51730400) expected, got Project(#50128210) | ||
# For more information, see http://dev.rubyonrails.org/ticket/8246 | ||
################################ | ||
A number of solutions are recommended in the ticket above. Of all the ones recommended (there are several changes to environment.rb), the only one | ||
that worked was to patch association_proxy.rb. For more info, see: | ||
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/d2adc451ff0236c2/b95a3bc9cb97f988?#b95a3bc9cb97f988 | ||
UPDATE: Unfortunately, this hasn't solved the problem. It seems that not only have the exact class representation changed, but whole | ||
methods have gone missing from the newly loaded versions! The only workaround left for me has been to run my local server in production mode. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
class ArchMailer < Mailer | ||
|
||
def arch_decision_add(ad) | ||
redmine_headers 'Project' => ad.project.identifier, | ||
'Arch-Decision-Id' => ad.id, | ||
'Arch-Decision-Creator' => ad.created_by.login | ||
redmine_headers 'Arch-Decision-Assignee' => ad.assigned_to.login if ad.assigned_to | ||
recipients ad.recipients | ||
cc(ad.watcher_recipients - @recipients) | ||
subject "[#{ad.project.name} - Arch Decision ##{ad.id}] (#{ad.status.name}) #{ad.summary}" | ||
body :arch_decision => ad, | ||
:arch_decision_url => url_for(:controller => 'arch_decisions', :action => 'show', :id => ad, :project_id => ad.project) | ||
render_multipart('arch_decision_add', body) | ||
end | ||
|
||
def arch_decision_edit(ad) | ||
redmine_headers 'Project' => ad.project.identifier, | ||
'Arch-Decision-Id' => ad.id, | ||
'Arch-Decision-Creator' => ad.created_by.login | ||
redmine_headers 'Arch-Decision-Assignee' => ad.assigned_to.login if ad.assigned_to | ||
@author = ad.updated_by | ||
recipients ad.recipients | ||
# Watchers in cc | ||
cc(ad.watcher_recipients - @recipients) | ||
s = "[#{ad.project.name} - Arch Decision ##{ad.id}] " | ||
s << "(#{ad.status.name}) " | ||
s << ad.summary | ||
subject s | ||
body :arch_decision => ad, | ||
:arch_decision_url => url_for(:controller => 'arch_decisions', :action => 'show', :id => ad, :project_id => ad.project) | ||
render_multipart('arch_decision_edit', body) | ||
end | ||
|
||
def arch_decision_discussion_add(add) | ||
redmine_headers 'Project' => discussion_project_id(add), | ||
'Arch-Decision-Discussion-Id' => add.id, | ||
'Arch-Decision-Discussion-Creator' => add.created_by.login | ||
recipients add.recipients | ||
cc(add.watcher_recipients - @recipients) | ||
subject "[#{discussion_project_name(add)} - #{add.parent_type} ##{add.parent.id}] - New discussion comment added" | ||
body :discussion => add, | ||
:discussion_url => discussion_url(add), | ||
:parent_description => discussion_parent_description(add) | ||
render_multipart('arch_decision_discussion_add', body) | ||
end | ||
|
||
def arch_decision_discussion_edit(add) | ||
redmine_headers 'Project' => discussion_project_id(add), | ||
'Arch-Decision-Discussion-Id' => add.id, | ||
'Arch-Decision-Discussion-Creator' => add.created_by.login | ||
@author = add.created_by | ||
recipients add.recipients | ||
# Watchers in cc | ||
cc(add.watcher_recipients - @recipients) | ||
subject "[#{discussion_project_name(add)} - #{add.parent_type} ##{add.parent.id}] - Discussion comment updated" | ||
body :discussion => add, | ||
:discussion_url => discussion_url(add), | ||
:parent_description => discussion_parent_description(add) | ||
render_multipart('arch_decision_discussion_edit', body) | ||
end | ||
|
||
private | ||
|
||
def discussion_project_id(add) | ||
add.project.nil? ? "Redmine" : add.project.identifier | ||
end | ||
|
||
def discussion_project_name(add) | ||
add.project.nil? ? "Redmine" : add.project.name | ||
end | ||
|
||
def discussion_url(add) | ||
case add.parent | ||
when ArchDecision then url_for(:controller => 'arch_decisions', :action => 'show', :id => add.parent.id, :project_id => add.project) | ||
when Factor then url_for(:controller => 'factors', :action => 'show', :id => add.parent.id) | ||
when Strategy then url_for(:controller => 'strategies', :action => 'show', :id => add.parent.id) | ||
else url_for(:controller => 'projects') # Parent nil! | ||
end | ||
end | ||
|
||
def discussion_parent_description(add) | ||
description = case add.parent | ||
when ArchDecision then add.arch_decision.summary | ||
when Factor then add.factor.summary | ||
when Strategy then add.strategy.short_name | ||
else "" | ||
end | ||
end | ||
end |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
116 changes: 58 additions & 58 deletions
116
app/views/arch_decision_issues/_related_arch_decisions.html.erb
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
<div id="related_arch_decisions"> | ||
<hr /> | ||
|
||
<div class="contextual"> | ||
<% if authorize_for('arch_decision_issues', 'add_issue') %> | ||
<%= toggle_link l(:button_add), 'add-arch-decision-form'%> | ||
<% end %> | ||
</div> | ||
|
||
<p><strong><%=l(:label_arch_decisions_related)%></strong></p> | ||
|
||
<%= error_messages_for 'arch_decision_issue' %> | ||
<% if @issue.arch_decision_issues.any? %> | ||
<table style="width:100%"> | ||
<% @issue.arch_decision_issues.each do |adissue| %> | ||
<% ad = adissue.arch_decision %> | ||
<tr> | ||
<td> | ||
<%= adissue.issue_type_phrase %> | ||
<%= link_to(l(:label_arch_decision) + " ##{ad.id}", :controller => 'arch_decisions', :action => 'show', :id => ad) %> | ||
</td> | ||
<td><%= h(ad.summary) %> </td> | ||
<td align="center" style="width:10%; white-space:nowrap;"><%= ad.status.name %></td> | ||
<td> | ||
<!-- Should be link_to_if_authorized, but for some reason it's not authorizing --> | ||
<small><%= link_to_remote_if_authorized "", | ||
{ :url => {:controller => 'arch_decision_issues', | ||
:action => 'remove_issue', | ||
:project_id => @project, | ||
:arch_decision_id => ad, | ||
:issue_id => @issue, | ||
:return_to => "issue" | ||
}, | ||
:confirm => l(:text_issue_arch_decision_remove_confirmation, :id => ad.id)}, | ||
:class => 'icon icon-del' %></small> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
<% end %> | ||
<% if authorize_for(:arch_decision_issues, :add_issue) %> | ||
<% remote_form_for(:arch_decision_issue, @arch_decision_issue, | ||
:url => { :controller => "arch_decision_issues", :action => "add_issue", :project_id => @project, :return_to => "issue"}, | ||
:html => { :id => "add-arch-decision-form", :style => (@arch_decision_issue ? '' : 'display: none;') }) do |adi| %> | ||
<%= adi.hidden_field :issue_id, :value => @issue.id %> | ||
<%= adi.select :issue_type, (ArchDecisionIssue.issue_types.collect {|t| [ArchDecisionIssue.issue_type_phrase(t), t]}) %> | ||
<%= l(:label_arch_decision) %> # | ||
<%= adi.text_field :arch_decision_id, :size => 10 %> | ||
<small> | ||
<%= submit_tag l(:button_add) %> | ||
<%= submit_tag l(:button_cancel), :onclick => "cancelForm('add_ad'); return false;" %> | ||
</small> | ||
</td> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<div id="related_arch_decisions"> | ||
<hr /> | ||
|
||
<div class="contextual"> | ||
<% if authorize_for('arch_decision_issues', 'add_issue') %> | ||
<%= toggle_link l(:button_add), 'add-arch-decision-form'%> | ||
<% end %> | ||
</div> | ||
|
||
<p><strong><%=l(:label_arch_decisions_related)%></strong></p> | ||
|
||
<%= error_messages_for 'arch_decision_issue' %> | ||
<% if @issue.arch_decision_issues.any? %> | ||
<table style="width:100%"> | ||
<% @issue.arch_decision_issues.each do |adissue| %> | ||
<% ad = adissue.arch_decision %> | ||
<tr> | ||
<td> | ||
<%= adissue.issue_type_phrase %> | ||
<%= link_to(l(:label_arch_decision) + " ##{ad.id}", :controller => 'arch_decisions', :action => 'show', :id => ad) %> | ||
</td> | ||
<td><%= h(ad.summary) %> </td> | ||
<td align="center" style="width:10%; white-space:nowrap;"><%= ad.status.name %></td> | ||
<td> | ||
<!-- Should be link_to_if_authorized, but for some reason it's not authorizing --> | ||
<small><%= link_to_remote_if_authorized "", | ||
{ :url => {:controller => 'arch_decision_issues', | ||
:action => 'remove_issue', | ||
:project_id => @project, | ||
:arch_decision_id => ad, | ||
:issue_id => @issue, | ||
:return_to => "issue" | ||
}, | ||
:confirm => l(:text_issue_arch_decision_remove_confirmation, :id => ad.id)}, | ||
:class => 'icon icon-del' %></small> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
<% end %> | ||
<% if authorize_for(:arch_decision_issues, :add_issue) %> | ||
<% remote_form_for(:arch_decision_issue, @arch_decision_issue, | ||
:url => { :controller => "arch_decision_issues", :action => "add_issue", :project_id => @project, :return_to => "issue"}, | ||
:html => { :id => "add-arch-decision-form", :style => (@arch_decision_issue ? '' : 'display: none;') }) do |adi| %> | ||
<%= adi.hidden_field :issue_id, :value => @issue.id %> | ||
<%= adi.select :issue_type, (ArchDecisionIssue.issue_types.collect {|t| [ArchDecisionIssue.issue_type_phrase(t), t]}) %> | ||
<%= l(:label_arch_decision) %> # | ||
<%= adi.text_field :arch_decision_id, :size => 10 %> | ||
<small> | ||
<%= submit_tag l(:button_add) %> | ||
<%= submit_tag l(:button_cancel), :onclick => "cancelForm('add_ad'); return false;" %> | ||
</small> | ||
</td> | ||
<% end %> | ||
<% end %> | ||
</div> |
Empty file.
Oops, something went wrong.