issue_filter.header.action_plan=Action plan
issue_filter.header.assignee=Assignee
issue_filter.header.creation_date=Creation date
+issue_filter.header.resolution=Resolution
issue_filter.header.update_date=Update date
-issue_filter.criteria.severities=Severities
-issue_filter.criteria.project=Project
-issue_filter.criteria.status=Status
issue_filter.criteria.assignee=Assignee
-issue_filter.criteria.reporter=Reporter
issue_filter.criteria.created_after=Created since
issue_filter.criteria.created_before=Created before
issue_filter.criteria.date_format=year-month-day (2013-01-31)
+issue_filter.criteria.project=Project
+issue_filter.criteria.reporter=Reporter
+issue_filter.criteria.resolution=Resolution
+issue_filter.criteria.severities=Severities
+issue_filter.criteria.status=Status
issue_filter.max_results_reached=Only the first {0} issues matching the search criteria have been retrieved. Add some additional criteria to get less results to be able to sort this list.
+issue_filter.no_result=No matching issues found.
#------------------------------------------------------------------------------
CREATE INDEX "ISSUES_SEVERITY" ON "ISSUES" ("SEVERITY");
-CREATE INDEX "ISSUES_STATUS" ON "ISSUES" ("STATUS");
+CREATE INDEX "ISSUES_STATUS_RESOLUTION" ON "ISSUES" ("STATUS", "RESOLUTION");
CREATE INDEX "ISSUES_ASSIGNEE" ON "ISSUES" ("ASSIGNEE");
*/
package org.sonar.api.issue;
+import com.google.common.collect.ImmutableList;
import org.sonar.api.rule.RuleKey;
import javax.annotation.CheckForNull;
String RESOLUTION_FIXED = "FIXED";
String RESOLUTION_FALSE_POSITIVE = "FALSE-POSITIVE";
+ List<String> RESOLUTIONS = ImmutableList.of(RESOLUTION_FALSE_POSITIVE, RESOLUTION_FIXED);
+
/**
* Unique generated key
*/
import org.sonar.server.util.RubyUtils;
import javax.annotation.Nullable;
+
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
return issueService.listStatus();
}
+ public List<String> listResolutions() {
+ return Issue.RESOLUTIONS;
+ }
+
public Issue doTransition(String issueKey, String transitionKey) {
return issueService.doTransition(issueKey, transitionKey, UserSession.get());
}
before_filter :init
def index
- @filter = IssueFilter.new
- render :action => 'search'
+ redirect_to :action => 'search'
end
def search
private
def init
- status = Internal.issues.listStatus()
- @options_for_status = status.map {|s| [message('issue.status.' + s), s]}
+ @options_for_statuses = Internal.issues.listStatus().map {|s| [message('issue.status.' + s), s]}
+ @options_for_resolutions = Internal.issues.listResolutions().map {|s| [message('issue.resolution.' + s), s]}
end
def criteria_params
@paging = nil
@issues = nil
criteria['pageSize'] = 100
- criteria['sort'] ||= 'SEVERITY'
- criteria['asc'] ||= 'false'
self
end
<th width="1%" nowrap>
<%= column_html(@filter, message('status'), message('status'), 'STATUS') %>
</th>
+ <th width="1%" nowrap>
+ <%= message('issue_filter.header.resolution') -%>
+ </th>
<th>
<%= message('description') -%>
</th>
<%= message("issue.status.#{issue.status}") -%>
</td>
<td>
- <%= link_to h(truncate(issue.message, :length => 200)), :controller => 'issue', :action => 'view', :id => issue.key -%>
+ <%= message("issue.resolution.#{issue.resolution}") if issue.resolution -%>
+ </td>
+ <td>
+ <%= link_to h(truncate(issue.message, :length => 100)), :controller => 'issue', :action => 'view', :id => issue.key -%>
</td>
<td>
<%= h (truncate(@filter.issues_result.project(issue).name, :length => 100)) -%>
<%
elsif @filter.issues
%>
- <p><%= message('no_results') -%></p>
+ <p><%= message('issue_filter.no_result') -%></p>
<%
end
%>
</li>
<li id="criteria-status" class="marginbottom5">
<%= message 'issue_filter.criteria.status' -%>:
- <%= dropdown_tag 'statuses[]', options_for_select(@options_for_status, @filter.criteria('statuses')),
+ <%= dropdown_tag 'statuses[]', options_for_select(@options_for_statuses, @filter.criteria('statuses')),
{:width => '100%', :placeholder => message('issue_filter.criteria.status')},
{:id => 'select-status', :multiple => true}-%>
</li>
+ <li id="criteria-resolution" class="marginbottom5">
+ <%= message 'issue_filter.criteria.resolution' -%>:
+ <%= dropdown_tag 'resolutions[]', options_for_select(@options_for_resolutions, @filter.criteria('resolutions')),
+ {:width => '100%', :placeholder => message('issue_filter.criteria.resolution')},
+ {:id => 'select-resolution', :multiple => true}-%>
+ </li>
<li>
<%= message 'issue_filter.criteria.assignee' -%>:
<% selected_assignee = @filter.issues_result.user(@filter.criteria('assignees')) if @filter.issues_result %>
t.column :updated_at, :datetime, :null => true
end
- add_index :issues, :kee, :name => 'issues_kee', :unique => true
- add_index :issues, :resource_id, :name => 'issues_resource_id'
- add_index :issues, :rule_id, :name => 'issues_rule_id'
- add_index :issues, :severity, :name => 'issues_severity'
- add_index :issues, :status, :name => 'issues_status'
- add_index :issues, :assignee, :name => 'issues_assignee'
- add_index :issues, :action_plan_key, :name => 'issues_action_plan_key'
- add_index :issues, :issue_creation_date, :name => 'issues_creation_date'
+ add_index :issues, :kee, :name => 'issues_kee', :unique => true
+ add_index :issues, :resource_id, :name => 'issues_resource_id'
+ add_index :issues, :rule_id, :name => 'issues_rule_id'
+ add_index :issues, :severity, :name => 'issues_severity'
+ add_index :issues, [:status, :resolution], :name => 'issues_status_resolution'
+ add_index :issues, :assignee, :name => 'issues_assignee'
+ add_index :issues, :action_plan_key, :name => 'issues_action_plan_key'
+ add_index :issues, :issue_creation_date, :name => 'issues_creation_date'
end
end