prototype.patch

Brad Beattie, 2009-04-29 23:41

Download (2.17 KB)

View differences:

app/models/query.rb (working copy)
175 175
    if User.current.logged?
176 176
      @available_filters["watcher_id"] = { :type => :list, :order => 15, :values => [["<< #{l(:label_me)} >>", "me"]] }
177 177
    end
178
    
179
    @available_filters["relation_related_issues"] = { :type => :integer, :order => 50 }
180
    @available_filters["relation_blocked_issues"] = { :type => :integer, :order => 51 }
181
    @available_filters["relation_blocking_issues"] = { :type => :integer, :order => 52 }
182
    @available_filters["relation_preceeding_issues"] = { :type => :integer, :order => 53 }
183
    @available_filters["relation_preceeded_issues"] = { :type => :integer, :order => 54 }
184
    @available_filters["relation_duplicate_issues"] = { :type => :integer, :order => 55 }
185
    @available_filters["relation_duplicated_issues"] = { :type => :integer, :order => 56 }
178 186
  
179 187
    if project
180 188
      # project specific filters
......
365 373
        db_field = 'user_id'
366 374
        sql << "#{Issue.table_name}.id #{ operator == '=' ? 'IN' : 'NOT IN' } (SELECT #{db_table}.watchable_id FROM #{db_table} WHERE #{db_table}.watchable_type='Issue' AND "
367 375
        sql << sql_for_field(field, '=', v, db_table, db_field) + ')'
376
      elsif field =~ /^relation_(.*)$/
377
        db_table = IssueRelation.table_name
378
        db_field = 'issue_from_id'
379
        sql << "#{Issue.table_name}.id IN (SELECT #{db_table}.issue_from_id FROM #{db_table} WHERE #{db_table}.relation_type='blocks' GROUP BY #{db_table}.issue_from_id HAVING count(*) > 0)"
368 380
      else
369 381
        # regular field
370 382
        db_table = Issue.table_name
config/locales/en.yml (working copy)
243 243
  field_identity_url: OpenID URL
244 244
  field_content: Content
245 245
  field_group_by: Group results by
246
  field_relation_blocked_issues: Blocked issues
247
  field_relation_blocking_issues: Blocking issues
246 248
  
247 249
  setting_app_title: Application title
248 250
  setting_app_subtitle: Application subtitle