mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Fix missing journal indice when updating a journal (#31427).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18310 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f535aa99af
commit
af987c9ed4
@ -30,8 +30,9 @@ module JournalsHelper
|
|||||||
links = []
|
links = []
|
||||||
if journal.notes.present?
|
if journal.notes.present?
|
||||||
if options[:reply_links]
|
if options[:reply_links]
|
||||||
|
indice = journal.indice || @journal.issue.visible_journals_with_index.find{|j| j.id == @journal.id}.indice
|
||||||
links << link_to(l(:button_quote),
|
links << link_to(l(:button_quote),
|
||||||
quoted_issue_path(issue, :journal_id => journal, :journal_indice => journal.indice),
|
quoted_issue_path(issue, :journal_id => journal, :journal_indice => indice),
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'post',
|
:method => 'post',
|
||||||
:title => l(:button_quote),
|
:title => l(:button_quote),
|
||||||
|
|||||||
@ -257,6 +257,8 @@ class JournalsControllerTest < Redmine::ControllerTest
|
|||||||
assert_equal 'text/javascript', response.content_type
|
assert_equal 'text/javascript', response.content_type
|
||||||
assert_equal 'Updated notes', Journal.find(2).notes
|
assert_equal 'Updated notes', Journal.find(2).notes
|
||||||
assert_include 'journal-2-notes', response.body
|
assert_include 'journal-2-notes', response.body
|
||||||
|
# response should include journal_indice param for quote link
|
||||||
|
assert_include 'journal_indice=2', response.body
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_update_xhr_with_private_notes_checked
|
def test_update_xhr_with_private_notes_checked
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user