https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292017-11-28T10:03:15ZRedmineRedmine - Patch #27663: Same relates relation can be created twicehttps://www.redmine.org/issues/27663?journal_id=823252017-11-28T10:03:15ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/19591">duplicated-related-issue@2x.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/19591/duplicated-related-issue@2x.png">duplicated-related-issue@2x.png</a> added</li><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul><p>I confirmed the problem.</p>
<p><img src="https://www.redmine.org/attachments/download/19591/duplicated-related-issue@2x.png" srcset="https://www.redmine.org/attachments/download/19591/duplicated-related-issue@2x.png 2x" style="width: 718px;border: 1px solid #ccc;" alt="" /></p>
<pre>
sqlite> select * from issue_relations where issue_from_id in (42, 43);
id issue_from_id issue_to_id relation_type delay
---------- ------------- ----------- ------------- ----------
5 42 43 relates
4 43 42 relates
</pre> Redmine - Patch #27663: Same relates relation can be created twicehttps://www.redmine.org/issues/27663?journal_id=823272017-11-28T10:27:55ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next minor release</i> to <i>3.3.6</i></li></ul><p>LGTM. Setting target version to 3.3.6.</p> Redmine - Patch #27663: Same relates relation can be created twicehttps://www.redmine.org/issues/27663?journal_id=823652017-11-29T22:23:27ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li></ul> Redmine - Patch #27663: Same relates relation can be created twicehttps://www.redmine.org/issues/27663?journal_id=823692017-11-30T00:07:31ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>New</i></li><li><strong>Assignee</strong> deleted (<del><i>Go MAEDA</i></del>)</li></ul><p>The patch breaks a test.</p>
<pre>
$ bin/rails test test/functional/issue_relations_controller_test.rb
Run options: --seed 33551
# Running:
...F
Failure:
IssueRelationsControllerTest#test_create_xhr [/Users/maeda/redmines/redmine-trunk/test/functional/issue_relations_controller_test.rb:85]:
Expected: 3
Actual: 1
bin/rails test test/functional/issue_relations_controller_test.rb:70
........
Finished in 4.495535s, 2.6693 runs/s, 6.6733 assertions/s.
12 runs, 30 assertions, 1 failures, 0 errors, 0 skips
</pre> Redmine - Patch #27663: Same relates relation can be created twicehttps://www.redmine.org/issues/27663?journal_id=823702017-11-30T00:33:52ZGo MAEDA
<ul></ul><p>Fix for the test failure described in <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Same relates relation can be created twice (Closed)" href="https://www.redmine.org/issues/27663#note-4">#27663#note-4</a>.<br /><code>issue_from_id</code> is always smaller than <code>issue_to_id</code> after applying the patch.</p>
<pre><code class="diff syntaxhl"><span class="gh">Index: test/functional/issue_relations_controller_test.rb
===================================================================
</span><span class="gd">--- test/functional/issue_relations_controller_test.rb (revision 17054)
</span><span class="gi">+++ test/functional/issue_relations_controller_test.rb (working copy)
</span><span class="p">@@ -82,8 +82,8 @@</span>
assert_equal 'text/javascript', response.content_type
end
relation = IssueRelation.order('id DESC').first
<span class="gd">- assert_equal 3, relation.issue_from_id
- assert_equal 1, relation.issue_to_id
</span><span class="gi">+ assert_equal 1, relation.issue_from_id
+ assert_equal 3, relation.issue_to_id
</span>
assert_include 'Bug #1', response.body
end
</code></pre> Redmine - Patch #27663: Same relates relation can be created twicehttps://www.redmine.org/issues/27663?journal_id=824732017-12-06T13:28:58ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li></ul><p>Committed in the trunk and merged to stable branches. Thank you.</p> Redmine - Patch #27663: Same relates relation can be created twicehttps://www.redmine.org/issues/27663?journal_id=824762017-12-06T13:32:41ZGregor Schmidtschmidt@nach-vorne.eu
<ul></ul><p>Thanks a lot.</p>
<p>I am very sorry for breaking the test suite. I hope this did not cause too much trouble. I'll make sure to run the whole test suite next time.</p>