https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292017-03-05T06:46:53ZRedmineRedmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=771052017-03-05T06:46:53ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/22107">Feature #22107</a>: Add "Project status" to issues list's filters</i> added</li></ul> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=880592018-10-21T22:12:59ZMarius BĂLTEANU
<ul><li><strong>File</strong> <i>0001-Filter-issues-after-project-status.patch</i> added</li><li><strong>File</strong> <a href="/attachments/21701">0002-Filter-time-entries-after-project-status.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/21701/0002-Filter-time-entries-after-project-status.patch">0002-Filter-time-entries-after-project-status.patch</a> added</li></ul><p>Attached two patches that add the "Project's status" filter to issues and time entries. Beside the filter itself utility, if we add this feature, will allow us to implement <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Filter out issues from closed projects in My Page blocks (Closed)" href="https://www.redmine.org/issues/29449">#29449</a> and also, to discuss (I'll add another ticket) the possibility to hide the issues/time entries from closed projects by default (as the closed projects are hidden by default in Projects page).</p> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=880612018-10-21T22:13:39ZMarius BĂLTEANU
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/29482">Feature #29482</a>: Query system for Projects page</i> added</li></ul> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=880632018-10-21T22:13:50ZMarius BĂLTEANU
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/29449">Feature #29449</a>: Filter out issues from closed projects in My Page blocks</i> added</li></ul> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=880652018-10-21T22:13:56ZMarius BĂLTEANU
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/29449">Feature #29449</a>: Filter out issues from closed projects in My Page blocks</i>)</li></ul> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=880662018-10-21T22:14:02ZMarius BĂLTEANU
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/29449">Feature #29449</a>: Filter out issues from closed projects in My Page blocks</i> added</li></ul> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=880702018-10-21T22:23:13ZMarius BĂLTEANU
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/12066">Feature #12066</a>: Don't show issues for closed projects in all issues list</i> added</li></ul> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=881152018-10-27T03:48:48ZGo MAEDA
<ul></ul><p>Marius, thank you for writing the patch.</p>
<p>It seems working fine but I came across the following error while running tests after applying <br />0001-Filter-issues-after-project-status.patch. Could you look into this?</p>
<pre>
Failure:
QueriesHelperTest#test_filters_options_for_select_should_group_associations_filters [/Users/maeda/redmines/redmine-trunk/test/helpers/queries_helper_test.rb:78]:
Expected exactly 2 elements matching "optgroup[label="Project"] > option", found 3..
Expected: 2
Actual: 3
</pre> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=881352018-10-28T15:38:38ZMarius BĂLTEANU
<ul><li><strong>File</strong> deleted (<del><i>0001-Filter-issues-after-project-status.patch</i></del>)</li></ul> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=881362018-10-28T15:39:34ZMarius BĂLTEANU
<ul><li><strong>File</strong> <a href="/attachments/21732">0001-Filter-issues-after-project-status.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/21732/0001-Filter-issues-after-project-status.patch">0001-Filter-issues-after-project-status.patch</a> added</li></ul><p>Fixed in the attached patch.</p>
<p>Sorry for not catching this test fail from the beginning.</p> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=881592018-10-29T04:27:16ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Show only active projects in the filter</i> to <i>Filter issues and time entries by project status</i></li><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><li><strong>Target version</strong> set to <i>4.0.0</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed. Thank you for improving Redmine.</p> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=886192018-11-30T03:50:56ZRang Tang
<ul><li><strong>File</strong> <a href="/attachments/21897">Screenshot from 2018-11-30 10-44-08.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/21897/Screenshot%20from%202018-11-30%2010-44-08.png">Screenshot from 2018-11-30 10-44-08.png</a> added</li></ul><p>Hi,<br />I came from <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Filter out issues from closed projects in My Page blocks (Closed)" href="https://www.redmine.org/issues/29449">#29449</a> and just applied these patches to my redmine 3.4 instance:</p>
<ul>
<li>0001-Filter-issues-after-project-status.patch</li>
<li>0002-Filter-time-entries-after-project-status.patch</li>
<li>0003-Filter-our-issues-from-closed-projects-in-the-follow.patch (from <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Filter out issues from closed projects in My Page blocks (Closed)" href="https://www.redmine.org/issues/29449">#29449</a>)</li>
<li>use_status_active_constant.diff (from <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Filter out issues from closed projects in My Page blocks (Closed)" href="https://www.redmine.org/issues/29449">#29449</a>)</li>
</ul>
<p>Now that issues from closed project are filtered out from my page as I expected.<br />However, a "translation missing" error now appears in the filter on the query page:<br /><img src="/attachments/download/21897/Screenshot%20from%202018-11-30%2010-44-08.png" alt="" /></p>
<p>I find it's because Project::LABEL_BY_STATUS (patch 0001) is not working as expected. (I think I18n is not loaded yet when this hash value gets evaluated)</p>
<p>I can fix this by putting the labels hash into query.rb instead of calling Project::LABEL_BY_STATUS. But is there a way to keep the labels inside the Project model and still be able to use the translations? I'm new to ruby and rails and looking forward to some advice.</p>
<pre>
diff --git a/app/models/query.rb b/app/models/query.rb
index dc84402..218c560 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -573,7 +573,11 @@ class Query < ActiveRecord::Base
# Returns a scope of project statuses that are available as columns or filters
def project_statuses_values
- project_statuses = Project::LABEL_BY_STATUS
+ project_statuses = {
+ 1 => l(:project_status_active),
+ 5 => l(:project_status_closed),
+ 9 => l(:project_status_archived),
+ }
# Remove archived status from filters
project_statuses.delete(9)
project_statuses.stringify_keys.invert.to_a
</pre> Redmine - Feature #20081: Filter issues and time entries by project statushttps://www.redmine.org/issues/20081?journal_id=901392019-02-14T21:42:19ZMarius BĂLTEANU
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/30718">Defect #30718</a>: Translation missing for filter by project status</i> added</li></ul>