@@ -0,0 +1,34 | |||||
|
1 | <% manage_allowed = User.current.allowed_to?(:manage_related_issues, @repository.project) %> | |||
|
2 | ||||
|
3 | <div id="related-issues"> | |||
|
4 | <% if manage_allowed %> | |||
|
5 | <div class="contextual"> | |||
|
6 | <%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'issue_id'} %> | |||
|
7 | </div> | |||
|
8 | <% end %> | |||
|
9 | ||||
|
10 | <h3><%= l(:label_related_issues) %></h3> | |||
|
11 | <ul> | |||
|
12 | <% @changeset.issues.visible.each do |issue| %> | |||
|
13 | <li id="<%= "related-issue-#{issue.id}" %>"><%= link_to_issue issue %> | |||
|
14 | <%= link_to_remote(image_tag('link_break.png'), | |||
|
15 | {:url => {:controller => 'repositories', :action => 'remove_related_issue', :id => @project, :repository_id => @repository.identifier_param, :rev => @changeset.identifier, :issue_id => issue}, | |||
|
16 | :method => :delete, | |||
|
17 | }, :title => l(:label_relation_delete)) if manage_allowed %> | |||
|
18 | ||||
|
19 | </li> | |||
|
20 | <% end %> | |||
|
21 | </ul> | |||
|
22 | ||||
|
23 | <% if manage_allowed %> | |||
|
24 | <% remote_form_for(:issue, @issue, | |||
|
25 | :url => {:controller => 'repositories', :action => 'add_related_issue', :id => @project, :repository_id => @repository.identifier_param, :rev => @changeset.identifier}, | |||
|
26 | :method => :post, | |||
|
27 | :complete => "Form.Element.focus('issue_id');", | |||
|
28 | :html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %> | |||
|
29 | <%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %> | |||
|
30 | <%= submit_tag l(:button_add) %> | |||
|
31 | <%= toggle_link l(:button_cancel), 'new-relation-form'%> | |||
|
32 | <% end %> | |||
|
33 | <% end %> | |||
|
34 | </div> |
@@ -30,6 +30,7 class RepositoriesController < ApplicationController | |||||
30 | before_filter :find_project_by_project_id, :only => [:new, :create] |
|
30 | before_filter :find_project_by_project_id, :only => [:new, :create] | |
31 | before_filter :find_repository, :only => [:edit, :update, :destroy, :committers] |
|
31 | before_filter :find_repository, :only => [:edit, :update, :destroy, :committers] | |
32 | before_filter :find_project_repository, :except => [:new, :create, :edit, :update, :destroy, :committers] |
|
32 | before_filter :find_project_repository, :except => [:new, :create, :edit, :update, :destroy, :committers] | |
|
33 | before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue] | |||
33 | before_filter :authorize |
|
34 | before_filter :authorize | |
34 | accept_rss_auth :revisions |
|
35 | accept_rss_auth :revisions | |
35 |
|
36 | |||
@@ -185,16 +186,56 class RepositoriesController < ApplicationController | |||||
185 | end |
|
186 | end | |
186 |
|
187 | |||
187 | def revision |
|
188 | def revision | |
188 | raise ChangesetNotFound if @rev.blank? |
|
|||
189 | @changeset = @repository.find_changeset_by_name(@rev) |
|
|||
190 | raise ChangesetNotFound unless @changeset |
|
|||
191 |
|
||||
192 | respond_to do |format| |
|
189 | respond_to do |format| | |
193 | format.html |
|
190 | format.html | |
194 | format.js {render :layout => false} |
|
191 | format.js {render :layout => false} | |
195 | end |
|
192 | end | |
196 | rescue ChangesetNotFound |
|
193 | end | |
197 | show_error_not_found |
|
194 | ||
|
195 | # Adds a related issue to a changeset | |||
|
196 | # POST /projects/:project_id/repository/(:repository_id/)revisions/:rev/issues | |||
|
197 | def add_related_issue | |||
|
198 | @issue = @changeset.find_referenced_issue_by_id(params[:issue_id]) | |||
|
199 | if @issue && (!@issue.visible? || @changeset.issues.include?(@issue)) | |||
|
200 | @issue = nil | |||
|
201 | end | |||
|
202 | ||||
|
203 | if @issue | |||
|
204 | @changeset.issues << @issue | |||
|
205 | respond_to do |format| | |||
|
206 | format.js { | |||
|
207 | render :update do |page| | |||
|
208 | page.replace_html "related-issues", :partial => "related_issues" | |||
|
209 | page.visual_effect :highlight, "related-issue-#{@issue.id}" | |||
|
210 | end | |||
|
211 | } | |||
|
212 | end | |||
|
213 | else | |||
|
214 | respond_to do |format| | |||
|
215 | format.js { | |||
|
216 | render :update do |page| | |||
|
217 | page.alert(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid')) | |||
|
218 | end | |||
|
219 | } | |||
|
220 | end | |||
|
221 | end | |||
|
222 | end | |||
|
223 | ||||
|
224 | # Removes a related issue from a changeset | |||
|
225 | # DELETE /projects/:project_id/repository/(:repository_id/)revisions/:rev/issues/:issue_id | |||
|
226 | def remove_related_issue | |||
|
227 | @issue = Issue.visible.find_by_id(params[:issue_id]) | |||
|
228 | if @issue | |||
|
229 | @changeset.issues.delete(@issue) | |||
|
230 | end | |||
|
231 | ||||
|
232 | respond_to do |format| | |||
|
233 | format.js { | |||
|
234 | render :update do |page| | |||
|
235 | page.remove "related-issue-#{@issue.id}" | |||
|
236 | end if @issue | |||
|
237 | } | |||
|
238 | end | |||
198 | end |
|
239 | end | |
199 |
|
240 | |||
200 | def diff |
|
241 | def diff | |
@@ -282,6 +323,13 class RepositoriesController < ApplicationController | |||||
282 | show_error_not_found |
|
323 | show_error_not_found | |
283 | end |
|
324 | end | |
284 |
|
325 | |||
|
326 | def find_changeset | |||
|
327 | if @rev.present? | |||
|
328 | @changeset = @repository.find_changeset_by_name(@rev) | |||
|
329 | end | |||
|
330 | show_error_not_found unless @changeset | |||
|
331 | end | |||
|
332 | ||||
285 | def show_error_not_found |
|
333 | def show_error_not_found | |
286 | render_error :message => l(:error_scm_not_found), :status => 404 |
|
334 | render_error :message => l(:error_scm_not_found), :status => 404 | |
287 | end |
|
335 | end |
@@ -184,8 +184,6 class Changeset < ActiveRecord::Base | |||||
184 | :from_revision => change[:from_revision]) |
|
184 | :from_revision => change[:from_revision]) | |
185 | end |
|
185 | end | |
186 |
|
186 | |||
187 | private |
|
|||
188 |
|
||||
189 | # Finds an issue that can be referenced by the commit message |
|
187 | # Finds an issue that can be referenced by the commit message | |
190 | def find_referenced_issue_by_id(id) |
|
188 | def find_referenced_issue_by_id(id) | |
191 | return nil if id.blank? |
|
189 | return nil if id.blank? | |
@@ -203,6 +201,8 class Changeset < ActiveRecord::Base | |||||
203 | issue |
|
201 | issue | |
204 | end |
|
202 | end | |
205 |
|
203 | |||
|
204 | private | |||
|
205 | ||||
206 | def fix_issue(issue) |
|
206 | def fix_issue(issue) | |
207 | status = IssueStatus.find_by_id(Setting.commit_fix_status_id.to_i) |
|
207 | status = IssueStatus.find_by_id(Setting.commit_fix_status_id.to_i) | |
208 | if status.nil? |
|
208 | if status.nil? |
@@ -64,13 +64,8 | |||||
64 |
|
64 | |||
65 | <%= textilizable @changeset.comments %> |
|
65 | <%= textilizable @changeset.comments %> | |
66 |
|
66 | |||
67 | <% if @changeset.issues.visible.any? %> |
|
67 | <% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %> | |
68 | <h3><%= l(:label_related_issues) %></h3> |
|
68 | <%= render :partial => 'related_issues' %> | |
69 | <ul> |
|
|||
70 | <% @changeset.issues.visible.each do |issue| %> |
|
|||
71 | <li><%= link_to_issue issue %></li> |
|
|||
72 | <% end %> |
|
|||
73 | </ul> |
|
|||
74 | <% end %> |
|
69 | <% end %> | |
75 |
|
70 | |||
76 | <% if User.current.allowed_to?(:browse_repository, @project) %> |
|
71 | <% if User.current.allowed_to?(:browse_repository, @project) %> |
@@ -1022,3 +1022,4 ar: | |||||
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1025 | permission_manage_related_issues: Manage related issues |
@@ -1020,3 +1020,4 bg: | |||||
1020 | description_date_range_interval: Изберете диапазон чрез задаване на начална и крайна дати |
|
1020 | description_date_range_interval: Изберете диапазон чрез задаване на начална и крайна дати | |
1021 | description_date_from: Въведете начална дата |
|
1021 | description_date_from: Въведете начална дата | |
1022 | description_date_to: Въведете крайна дата |
|
1022 | description_date_to: Въведете крайна дата | |
|
1023 | permission_manage_related_issues: Manage related issues |
@@ -1036,3 +1036,4 bs: | |||||
1036 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1036 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1037 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1037 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1038 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1038 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1039 | permission_manage_related_issues: Manage related issues |
@@ -1024,3 +1024,4 ca: | |||||
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1027 | permission_manage_related_issues: Manage related issues |
@@ -1025,3 +1025,4 cs: | |||||
1025 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1025 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1026 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1026 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1027 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1027 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1028 | permission_manage_related_issues: Manage related issues |
@@ -1039,3 +1039,4 da: | |||||
1039 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1039 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1040 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1040 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1041 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1041 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1042 | permission_manage_related_issues: Manage related issues |
@@ -1042,3 +1042,4 de: | |||||
1042 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1042 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1043 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1043 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1044 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1044 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1045 | permission_manage_related_issues: Manage related issues |
@@ -1022,3 +1022,4 el: | |||||
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1025 | permission_manage_related_issues: Manage related issues |
@@ -1024,3 +1024,4 en-GB: | |||||
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1027 | permission_manage_related_issues: Manage related issues |
@@ -440,6 +440,7 en: | |||||
440 | permission_delete_own_messages: Delete own messages |
|
440 | permission_delete_own_messages: Delete own messages | |
441 | permission_export_wiki_pages: Export wiki pages |
|
441 | permission_export_wiki_pages: Export wiki pages | |
442 | permission_manage_subtasks: Manage subtasks |
|
442 | permission_manage_subtasks: Manage subtasks | |
|
443 | permission_manage_related_issues: Manage related issues | |||
443 |
|
444 | |||
444 | project_module_issue_tracking: Issue tracking |
|
445 | project_module_issue_tracking: Issue tracking | |
445 | project_module_time_tracking: Time tracking |
|
446 | project_module_time_tracking: Time tracking |
@@ -1059,3 +1059,4 es: | |||||
1059 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1059 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1060 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1060 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1061 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1061 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1062 | permission_manage_related_issues: Manage related issues |
@@ -1025,3 +1025,4 eu: | |||||
1025 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1025 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1026 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1026 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1027 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1027 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1028 | permission_manage_related_issues: Manage related issues |
@@ -1024,3 +1024,4 fa: | |||||
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1027 | permission_manage_related_issues: Manage related issues |
@@ -1043,3 +1043,4 fi: | |||||
1043 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1043 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1044 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1044 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1045 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1045 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1046 | permission_manage_related_issues: Manage related issues |
@@ -436,6 +436,7 fr: | |||||
436 | permission_export_wiki_pages: Exporter les pages |
|
436 | permission_export_wiki_pages: Exporter les pages | |
437 | permission_manage_project_activities: Gérer les activités |
|
437 | permission_manage_project_activities: Gérer les activités | |
438 | permission_manage_subtasks: Gérer les sous-tâches |
|
438 | permission_manage_subtasks: Gérer les sous-tâches | |
|
439 | permission_manage_related_issues: Gérer les demandes associées | |||
439 |
|
440 | |||
440 | project_module_issue_tracking: Suivi des demandes |
|
441 | project_module_issue_tracking: Suivi des demandes | |
441 | project_module_time_tracking: Suivi du temps passé |
|
442 | project_module_time_tracking: Suivi du temps passé |
@@ -1033,3 +1033,4 gl: | |||||
1033 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1033 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1034 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1034 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1035 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1035 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1036 | permission_manage_related_issues: Manage related issues |
@@ -1027,3 +1027,4 he: | |||||
1027 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1027 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1028 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1028 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1029 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1029 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1030 | permission_manage_related_issues: Manage related issues |
@@ -1028,3 +1028,4 hr: | |||||
1028 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1028 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1029 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1029 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1030 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1030 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1031 | permission_manage_related_issues: Manage related issues |
@@ -1041,3 +1041,4 | |||||
1041 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1041 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1042 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1042 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1043 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1043 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1044 | permission_manage_related_issues: Manage related issues |
@@ -1028,3 +1028,4 id: | |||||
1028 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1028 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1029 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1029 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1030 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1030 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1031 | permission_manage_related_issues: Manage related issues |
@@ -1023,3 +1023,4 it: | |||||
1023 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1023 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1024 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1024 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1025 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1025 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1026 | permission_manage_related_issues: Manage related issues |
@@ -1052,3 +1052,4 ja: | |||||
1052 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1052 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1053 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1053 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1054 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1054 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1055 | permission_manage_related_issues: Manage related issues |
@@ -1072,3 +1072,4 ko: | |||||
1072 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1072 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1073 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1073 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1074 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1074 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1075 | permission_manage_related_issues: Manage related issues |
@@ -1082,3 +1082,4 lt: | |||||
1082 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1082 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1083 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1083 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1084 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1084 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1085 | permission_manage_related_issues: Manage related issues |
@@ -1016,3 +1016,4 lv: | |||||
1016 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1016 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1017 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1017 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1018 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1018 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1019 | permission_manage_related_issues: Manage related issues |
@@ -1022,3 +1022,4 mk: | |||||
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1025 | permission_manage_related_issues: Manage related issues |
@@ -1022,3 +1022,4 mn: | |||||
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1025 | permission_manage_related_issues: Manage related issues |
@@ -1004,3 +1004,4 nl: | |||||
1004 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1004 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1005 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1005 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1006 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1006 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1007 | permission_manage_related_issues: Manage related issues |
@@ -1012,3 +1012,4 | |||||
1012 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1012 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1013 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1013 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1014 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1014 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1015 | permission_manage_related_issues: Manage related issues |
@@ -1039,3 +1039,4 pl: | |||||
1039 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1039 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1040 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1040 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1041 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1041 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1042 | permission_manage_related_issues: Manage related issues |
@@ -1045,3 +1045,4 pt-BR: | |||||
1045 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1045 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1046 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1046 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1047 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1047 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1048 | permission_manage_related_issues: Manage related issues |
@@ -1027,3 +1027,4 pt: | |||||
1027 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1027 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1028 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1028 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1029 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1029 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1030 | permission_manage_related_issues: Manage related issues |
@@ -1019,3 +1019,4 ro: | |||||
1019 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1019 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1020 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1020 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1021 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1021 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1022 | permission_manage_related_issues: Manage related issues |
@@ -1135,3 +1135,4 ru: | |||||
1135 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1135 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1136 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1136 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1137 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1137 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1138 | permission_manage_related_issues: Manage related issues |
@@ -1022,3 +1022,4 sk: | |||||
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1025 | permission_manage_related_issues: Manage related issues |
@@ -1022,3 +1022,4 sl: | |||||
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1025 | permission_manage_related_issues: Manage related issues |
@@ -1022,3 +1022,4 sr-YU: | |||||
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1022 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1023 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1024 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1025 | permission_manage_related_issues: Manage related issues |
@@ -1023,3 +1023,4 sr: | |||||
1023 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1023 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1024 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1024 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1025 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1025 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1026 | permission_manage_related_issues: Manage related issues |
@@ -1063,3 +1063,4 sv: | |||||
1063 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1063 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1064 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1064 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1065 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1065 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1066 | permission_manage_related_issues: Manage related issues |
@@ -1019,3 +1019,4 th: | |||||
1019 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1019 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1020 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1020 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1021 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1021 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1022 | permission_manage_related_issues: Manage related issues |
@@ -1041,3 +1041,4 tr: | |||||
1041 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1041 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1042 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1042 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1043 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1043 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1044 | permission_manage_related_issues: Manage related issues |
@@ -1019,3 +1019,4 uk: | |||||
1019 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1019 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1020 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1020 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1021 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1021 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1022 | permission_manage_related_issues: Manage related issues |
@@ -1073,3 +1073,4 vi: | |||||
1073 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1073 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1074 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1074 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1075 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1075 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1076 | permission_manage_related_issues: Manage related issues |
@@ -1102,3 +1102,4 | |||||
1102 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1102 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1103 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1103 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1104 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1104 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1105 | permission_manage_related_issues: Manage related issues |
@@ -1024,3 +1024,4 zh: | |||||
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) |
|
1024 | text_issue_conflict_resolution_overwrite: Apply my changes anyway (previous notes will be kept but some changes may be overwritten) | |
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. |
|
1025 | notice_issue_update_conflict: The issue has been updated by an other user while you were editing it. | |
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} |
|
1026 | text_issue_conflict_resolution_cancel: Discard all my changes and redisplay %{link} | |
|
1027 | permission_manage_related_issues: Manage related issues |
@@ -250,6 +250,10 ActionController::Routing::Routes.draw do |map| | |||||
250 | :action => 'revisions' |
|
250 | :action => 'revisions' | |
251 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev', |
|
251 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev', | |
252 | :action => 'revision' |
|
252 | :action => 'revision' | |
|
253 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/issues', | |||
|
254 | :action => 'add_related_issue', :conditions => {:method => :post} | |||
|
255 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', | |||
|
256 | :action => 'remove_related_issue', :conditions => {:method => :delete} | |||
253 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff', |
|
257 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff', | |
254 | :action => 'diff' |
|
258 | :action => 'diff' | |
255 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format', |
|
259 | repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format', | |
@@ -272,6 +276,10 ActionController::Routing::Routes.draw do |map| | |||||
272 | :action => 'revisions' |
|
276 | :action => 'revisions' | |
273 | repository_views.connect 'projects/:id/repository/revisions/:rev', |
|
277 | repository_views.connect 'projects/:id/repository/revisions/:rev', | |
274 | :action => 'revision' |
|
278 | :action => 'revision' | |
|
279 | repository_views.connect 'projects/:id/repository/revisions/:rev/issues', | |||
|
280 | :action => 'add_related_issue', :conditions => {:method => :post} | |||
|
281 | repository_views.connect 'projects/:id/repository/revisions/:rev/issues/:issue_id', | |||
|
282 | :action => 'remove_related_issue', :conditions => {:method => :delete} | |||
275 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff', |
|
283 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff', | |
276 | :action => 'diff' |
|
284 | :action => 'diff' | |
277 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', |
|
285 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', |
@@ -128,6 +128,7 Redmine::AccessControl.map do |map| | |||||
128 | map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph] |
|
128 | map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph] | |
129 | map.permission :view_changesets, :repositories => [:show, :revisions, :revision] |
|
129 | map.permission :view_changesets, :repositories => [:show, :revisions, :revision] | |
130 | map.permission :commit_access, {} |
|
130 | map.permission :commit_access, {} | |
|
131 | map.permission :manage_related_issues, {:repositories => [:add_related_issue, :remove_related_issue]} | |||
131 | end |
|
132 | end | |
132 |
|
133 | |||
133 | map.project_module :boards do |map| |
|
134 | map.project_module :boards do |map| |
@@ -73,7 +73,8 module Redmine | |||||
73 | :manage_files, |
|
73 | :manage_files, | |
74 | :browse_repository, |
|
74 | :browse_repository, | |
75 | :view_changesets, |
|
75 | :view_changesets, | |
76 |
:commit_access |
|
76 | :commit_access, | |
|
77 | :manage_related_issues] | |||
77 |
|
78 | |||
78 | reporter = Role.create! :name => l(:default_role_reporter), |
|
79 | reporter = Role.create! :name => l(:default_role_reporter), | |
79 | :position => 3, |
|
80 | :position => 3, |
@@ -399,6 +399,8 ul.projects div.root a.project { font-family: "Trebuchet MS", Verdana, sans-seri | |||||
399 | #tracker_project_ids ul { margin: 0; padding-left: 1em; } |
|
399 | #tracker_project_ids ul { margin: 0; padding-left: 1em; } | |
400 | #tracker_project_ids li { list-style-type:none; } |
|
400 | #tracker_project_ids li { list-style-type:none; } | |
401 |
|
401 | |||
|
402 | #related-issues li img {vertical-align:middle;} | |||
|
403 | ||||
402 | ul.properties {padding:0; font-size: 0.9em; color: #777;} |
|
404 | ul.properties {padding:0; font-size: 0.9em; color: #777;} | |
403 | ul.properties li {list-style-type:none;} |
|
405 | ul.properties li {list-style-type:none;} | |
404 | ul.properties li span {font-style:italic;} |
|
406 | ul.properties li span {font-style:italic;} |
@@ -53,6 +53,7 roles_001: | |||||
53 | - :browse_repository |
|
53 | - :browse_repository | |
54 | - :manage_repository |
|
54 | - :manage_repository | |
55 | - :view_changesets |
|
55 | - :view_changesets | |
|
56 | - :manage_related_issues | |||
56 | - :manage_project_activities |
|
57 | - :manage_project_activities | |
57 |
|
58 | |||
58 | position: 1 |
|
59 | position: 1 |
@@ -160,6 +160,38 class RepositoriesControllerTest < ActionController::TestCase | |||||
160 | } |
|
160 | } | |
161 | end |
|
161 | end | |
162 |
|
162 | |||
|
163 | def test_add_related_issue | |||
|
164 | @request.session[:user_id] = 2 | |||
|
165 | assert_difference 'Changeset.find(103).issues.size' do | |||
|
166 | post :add_related_issue, :id => 1, :rev => 4, :issue_id => 2 | |||
|
167 | assert_response :success | |||
|
168 | end | |||
|
169 | assert_select_rjs :replace_html, 'related-issues' | |||
|
170 | assert_equal [2], Changeset.find(103).issue_ids | |||
|
171 | end | |||
|
172 | ||||
|
173 | def test_add_related_issue_with_invalid_issue_id | |||
|
174 | @request.session[:user_id] = 2 | |||
|
175 | assert_no_difference 'Changeset.find(103).issues.size' do | |||
|
176 | post :add_related_issue, :id => 1, :rev => 4, :issue_id => 9999 | |||
|
177 | assert_response :success | |||
|
178 | end | |||
|
179 | assert_include 'alert("Issue is invalid")', @response.body | |||
|
180 | end | |||
|
181 | ||||
|
182 | def test_remove_related_issue | |||
|
183 | Changeset.find(103).issues << Issue.find(1) | |||
|
184 | Changeset.find(103).issues << Issue.find(2) | |||
|
185 | ||||
|
186 | @request.session[:user_id] = 2 | |||
|
187 | assert_difference 'Changeset.find(103).issues.size', -1 do | |||
|
188 | delete :remove_related_issue, :id => 1, :rev => 4, :issue_id => 2 | |||
|
189 | assert_response :success | |||
|
190 | end | |||
|
191 | assert_select_rjs :remove, 'related-issue-2' | |||
|
192 | assert_equal [1], Changeset.find(103).issue_ids | |||
|
193 | end | |||
|
194 | ||||
163 | def test_graph_commits_per_month |
|
195 | def test_graph_commits_per_month | |
164 | get :graph, :id => 1, :graph => 'commits_per_month' |
|
196 | get :graph, :id => 1, :graph => 'commits_per_month' | |
165 | assert_response :success |
|
197 | assert_response :success |
@@ -341,6 +341,32 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||||
341 | ) |
|
341 | ) | |
342 | end |
|
342 | end | |
343 |
|
343 | |||
|
344 | def test_repositories_related_issues | |||
|
345 | assert_routing( | |||
|
346 | { :method => 'post', | |||
|
347 | :path => "/projects/redmine/repository/revisions/123/issues" }, | |||
|
348 | { :controller => 'repositories', :action => 'add_related_issue', :id => 'redmine', :rev => '123' } | |||
|
349 | ) | |||
|
350 | assert_routing( | |||
|
351 | { :method => 'delete', | |||
|
352 | :path => "/projects/redmine/repository/revisions/123/issues/25" }, | |||
|
353 | { :controller => 'repositories', :action => 'remove_related_issue', :id => 'redmine', :rev => '123', :issue_id => '25' } | |||
|
354 | ) | |||
|
355 | end | |||
|
356 | ||||
|
357 | def test_repositories_related_issues_with_repository_id | |||
|
358 | assert_routing( | |||
|
359 | { :method => 'post', | |||
|
360 | :path => "/projects/redmine/repository/foo/revisions/123/issues" }, | |||
|
361 | { :controller => 'repositories', :action => 'add_related_issue', :id => 'redmine', :repository_id => 'foo', :rev => '123' } | |||
|
362 | ) | |||
|
363 | assert_routing( | |||
|
364 | { :method => 'delete', | |||
|
365 | :path => "/projects/redmine/repository/foo/revisions/123/issues/25" }, | |||
|
366 | { :controller => 'repositories', :action => 'remove_related_issue', :id => 'redmine', :repository_id => 'foo', :rev => '123', :issue_id => '25' } | |||
|
367 | ) | |||
|
368 | end | |||
|
369 | ||||
344 | private |
|
370 | private | |
345 |
|
371 | |||
346 | def repository_path_hash(arr) |
|
372 | def repository_path_hash(arr) |
General Comments 0
You need to be logged in to leave comments.
Login now