https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292019-11-09T09:50:53ZRedmineRedmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=948382019-11-09T09:50:53ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/24304">spent-time-group-by-issue@2x.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/24304/spent-time-group-by-issue@2x.png">spent-time-group-by-issue@2x.png</a> added</li><li><strong>Target version</strong> set to <i>4.1.0</i></li></ul><p>This is a nice improvement. Setting the target version to 4.1.0.</p>
<p><img src="https://www.redmine.org/attachments/download/24304/spent-time-group-by-issue@2x.png" srcset="https://www.redmine.org/attachments/download/24304/spent-time-group-by-issue@2x.png 2x" style="width: 802px;border: 1px solid #ccc;" alt="" /></p> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=948532019-11-10T07:57:51ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li></ul><p>Committed, thanks.</p> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=948572019-11-10T12:25:50ZMarius BÄ‚LTEANU
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>A test fails on Postgresql (because of the <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Group results is different between MySQL and PostgreSQL (New)" href="https://www.redmine.org/issues/32404">#32404</a>):</p>
<pre><code>
Failure:
TimelogControllerTest#test_index_grouped_by_issue [/builds/redmine-org/redmine/test/functional/timelog_controller_test.rb:1429]:
--- expected
+++ actual
@@ -1 +1 @@
-"Bug #1: Cannot print recipes"
+"Bug #3: Error 281 when updating a recipe"
bin/rails test test/functional/timelog_controller_test.rb:1422
</code></pre>
<p>Until we fix that issue, I think it is good enough to rewrite the test added in <a class="changeset" title="Add support for grouping by issue on timelog view (#32436). Patch by Kouhei Sutou." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/19063">r19063</a> as following:</p>
<pre><code class="diff syntaxhl"><span class="gh">index 9c0b958b9..a362e769d 100644
</span><span class="gd">--- a/test/functional/timelog_controller_test.rb
</span><span class="gi">+++ b/test/functional/timelog_controller_test.rb
</span><span class="p">@@ -1426,10 +1426,6 @@</span> class TimelogControllerTest < Redmine::ControllerTest
}
assert_response :success
- assert_select 'tr.group span.name' do |elements|
<span class="gd">- target_element = elements[1]
- assert_equal "Bug #1: Cannot print recipes", target_element.text
- assert_select target_element, '+ span.count', :text => '2'
- end
</span><span class="gi">+ assert_select 'tr.group span.name', :text => "Bug #1: Cannot print recipes"
</span> end
end
</code></pre> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=948602019-11-10T21:13:15ZKouhei Sutou
<ul></ul><p>Does the following also work on PostgreSQL?</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 9c0b958b99..d2f6c94640 100644
</span><span class="gd">--- a/test/functional/timelog_controller_test.rb
</span><span class="gi">+++ b/test/functional/timelog_controller_test.rb
</span><span class="p">@@ -1426,10 +1426,8 @@</span> class TimelogControllerTest < Redmine::ControllerTest
}
assert_response :success
- assert_select 'tr.group span.name' do |elements|
<span class="gd">- target_element = elements[1]
- assert_equal "Bug #1: Cannot print recipes", target_element.text
- assert_select target_element, '+ span.count', :text => '2'
</span><span class="gi">+ assert_select 'tr.group span.name', :text => 'Bug #1: Cannot print recipes' do
+ assert_select '+ span.count', :text => '2'
</span> end
end
end
</code></pre> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=948842019-11-13T13:34:23ZMarius BÄ‚LTEANU
<ul></ul><p>Kouhei Sutou wrote:</p>
<blockquote>
<p>Does the following also work on PostgreSQL?</p>
<p>[...]</p>
</blockquote>
<p>From my point of view, it is not so important to validate the group count number in this case.</p> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=948932019-11-13T22:07:00ZKouhei Sutou
<ul></ul><p>I don't have strong opinion for this. I'm OK without assertion for count.</p> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=949252019-11-16T10:25:51ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Target version</strong> changed from <i>4.1.0</i> to <i>4.2.0</i></li></ul> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=949552019-11-20T08:20:58ZYuichi HARADA
<ul></ul><p>Kouhei Sutou wrote:</p>
<blockquote>
<p>Does the following also work on PostgreSQL?</p>
<p>[...]</p>
</blockquote>
<p>TimelogControllerTest passed after applying the <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Add support for grouping by issue on timelog view (Closed)" href="https://www.redmine.org/issues/32436#note-4">#32436-4</a> patch.</p>
<p>-- Before: trunk(<a class="changeset" title="Fix that text copied from some applications such as MS Office and LibreOffice is pasted as an ima..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/19089">r19089</a>) --</p>
<pre>
$ RAILS_ENV=test bundle exec rake db:migrate:reset
$ RAILS_ENV=test bundle exec rake test TEST=test/functional/timelog_controller_test.rb
Run options: --seed 27908
# Running:
............................................................................................F
Failure:
TimelogControllerTest#test_index_grouped_by_issue [test/functional/timelog_controller_test.rb:1429]:
--- expected
+++ actual
@@ -1 +1 @@
-"Bug #1: Cannot print recipes"
+"Bug #3: Error 281 when updating a recipe"
bin/rails test test/functional/timelog_controller_test.rb:1422
..........
Finished in 19.580212s, 5.2604 runs/s, 16.1387 assertions/s.
103 runs, 316 assertions, 1 failures, 0 errors, 0 skips
</pre>
<p>-- After: Apply <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Add support for grouping by issue on timelog view (Closed)" href="https://www.redmine.org/issues/32436#note-4">#32436-4</a> patch --</p>
<pre>
$ RAILS_ENV=test bundle exec rake db:migrate:reset
$ RAILS_ENV=test bundle exec rake test TEST=test/functional/timelog_controller_test.rb
Run options: --seed 52670
# Running:
.......................................................................................................
Finished in 21.153100s, 4.8693 runs/s, 14.9387 assertions/s.
103 runs, 316 assertions, 0 failures, 0 errors, 0 skips
</pre> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=949622019-11-20T15:08:31ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>Kouhei Sutou wrote:</p>
<blockquote>
<p>Does the following also work on PostgreSQL?</p>
</blockquote>
<p>Thanks, the assertion is better like this as it doesn't rely on the display order. It's committed.</p> Redmine - Feature #32436: Add support for grouping by issue on timelog viewhttps://www.redmine.org/issues/32436?journal_id=1015732021-03-28T00:08:12ZGo MAEDA
<ul><li><strong>Tracker</strong> changed from <i>Patch</i> to <i>Feature</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul>