Feature #22147

Change "Related issues" label for generic grouped query filters

Added by Sebastian Paluch over 1 year ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:UI
Target version:3.3.0
Resolution:Fixed

Description

The helper added to group filters of ":tree" and ":relation" type uses ":label_related_issues" as group label.

module QueriesHelper
  include ApplicationHelper

  def filters_options_for_select(query)
    ungrouped = []
    grouped = {}
    query.available_filters.map do |field, field_options|
      if [:tree, :relation].include?(field_options[:type]) 
        group = :label_related_issues
      elsif field =~ /^(.+)\./
        # association filters

This is not OK as the helper is for all queries, not only for Issue queries. I my case I have a project query and group title "Related issues" does not match.

I would like to propose creating new, more generic label e.g. "label_related: Related".


Related issues

Related to Redmine - Feature #13849: Grouped filters in the filter drop-down Closed
Related to Redmine - Feature #6118: Filter by parent task or subtasks Closed 2010-08-12

Associated revisions

Revision 15354
Added by Jean-Philippe Lang over 1 year ago

Change "Related issues" label for generic grouped query filters (#22147).

Revision 15361
Added by Jean-Philippe Lang over 1 year ago

Test failure (#22147).

History

#1 Updated by Toshi MARUYAMA over 1 year ago

  • Description updated (diff)

#2 Updated by Toshi MARUYAMA over 1 year ago

  • Category deleted (Translations)

#3 Updated by Toshi MARUYAMA over 1 year ago

  • Status changed from New to Needs feedback

field_options[:type] is not translated word. It is symbol defined at source:tags/3.2.1/app/models/query.rb#L212 .

#4 Updated by Toshi MARUYAMA over 1 year ago

  • Related to Feature #13849: Grouped filters in the filter drop-down added

#5 Updated by Toshi MARUYAMA over 1 year ago

  • Related to Feature #6118: Filter by parent task or subtasks added

#6 Updated by Toshi MARUYAMA over 1 year ago

Sebastian Paluch wrote:

This is not OK as the helper is for all queries, not only for Issue queries. I my case I have a project query and group title "Related issues" does not match.

Does it mean you use plugin which implement project query?

#7 Updated by Sebastian Paluch over 1 year ago

I have past in code that shows you where the :label_related_issues translation is used, I'm not talking about field_options[:type].

Yes, I have a plugin that implements project queries and in such case group called "Related Issues" is dummy. It should be more generic.

#8 Updated by Toshi MARUYAMA over 1 year ago

  • Subject changed from Change translation for grouped query filters to Change "Related issues" for generic grouped query filters
  • Status changed from Needs feedback to New
  • Target version set to 3.3.0

#9 Updated by Jean-Philippe Lang over 1 year ago

  • Subject changed from Change "Related issues" for generic grouped query filters to Change "Related issues" label for generic grouped query filters
  • Category set to UI
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Replaced with :label_relations.

Also available in: Atom PDF