<commit_before>class Projects::IssuesController < BaseProjectController
  load_and_authorize_resource :project
  load_and_authorize_resource through: :project

  helper_method :issue_params_names

  def index
    @q = @issues.ransack(params[:q])
    @q.sorts = "updated_at desc" if @q.sorts.empty?
    @q.state_filter = "opening" if @q.state_filter.blank?
    @issues_scope = @q.result

    if params[:related_task]
      @task = Task.find(params[:related_task])
    end

    if params[:filter] == "created"
      @issues_scope = @issues_scope.created_issues(current_member)
    end

    if params[:filter] == "assigned"
      @issues_scope = @issues_scope.assigned_issues(current_member)<commit_msg>优化问题搜索，搜索时不自动过滤结果<commit_after>class Projects::IssuesController < BaseProjectController
  load_and_authorize_resource :project
  load_and_authorize_resource through: :project

  helper_method :issue_params_names

  def index
    @q = @issues.ransack(params[:q])
    @q.sorts = "updated_at desc" if @q.sorts.empty?
    @q.state_filter ||= params[:q].blank? && params[:filter].blank? ? "opening" : "all"
    @issues_scope = @q.result

    if params[:related_task]
      @task = Task.find(params[:related_task])
    end

    if params[:filter] == "created"
      @issues_scope = @issues_scope.created_issues(current_member)
    end

    if params[:filter] == "assigned"
      @issues_scope = @issues_scope.assigned_issues(current_member)
{'fraction_non_alphanumeric': 0.1192468619246862, 'fraction_numerical': 0.0, 'mean_word_length': 4.498084291187739, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6951041', 'n_tokens_mistral': 490, 'n_tokens_neox': 482, 'n_words': 82}