%@ page import="com.atlassian.core.ofbiz.CoreFactory"%> <%@ page import="com.atlassian.core.ofbiz.CoreFactory"%> <%@ page import="com.atlassian.core.util.map.EasyMap"%> <%@ page import="org.ofbiz.core.entity.*"%> <%@ page import="com.opensymphony.util.TextUtils"%> <%@ page import="java.io.IOException"%> <%@ page import="com.atlassian.jira.ComponentManager"%> <%@ page import="com.atlassian.core.util.collection.EasyList"%> <%@ page import="java.util.Map"%> <%@ page import="com.opensymphony.user.User"%> <%@ page import="webwork.action.ActionContext"%> <%@ page import="com.atlassian.seraph.auth.DefaultAuthenticator"%> <%@ page import="com.atlassian.jira.ManagerFactory"%> <%@ page import="com.atlassian.jira.security.Permissions"%> <%@ taglib uri="webwork" prefix="webwork" %> <%@ taglib uri="sitemesh-page" prefix="page" %> <%! private static final String COMMENT_TABLE_ENTITY_NAME = "Action"; private static final String MODE_PARAM_NAME = "mode"; private static final String COMMENT_ID_PARAM_NAME = "comment_id"; %>
You do not have permissions to ADMINISTER JIRA.
"); return; } %> <% String mode = request.getParameter(MODE_PARAM_NAME); if ("confirm".equals(mode)) { String[] commentIds = request.getParameterValues(COMMENT_ID_PARAM_NAME); if (commentIds != null && commentIds.length > 0) { %> <%-- Confirm Mode --%>Please confirm that you would like to delete the comments shown in the table below.
The deleted comments will not be recorded into change history of their issue. Once you confirm this screen, there will be no way to restore these comments.
No comments to delete were selected. Please select at least one comment to delete.
<% } } else if ("delete".equals(mode)) { // Delete Mode String[] commentIds = request.getParameterValues(COMMENT_ID_PARAM_NAME); if (commentIds != null && commentIds.length > 0) { for (int i = 0; i < commentIds.length; i++) { Long commentId = new Long(commentIds[i]); int numberDeleted = deleteComment(commentId); if (numberDeleted > 0) { out.println("Deleted comment with id " + commentId + "No comments to delete were selected. Please select at least one comment to delete.
<% } } else { %> <%-- Default Mode --%> <% int numberOfComments = 100; String ncs = request.getParameter("numberComments"); if (ncs != null) { try { numberOfComments = Integer.parseInt(ncs); } catch (NumberFormatException e) { // Ignore and leave the variable to be 100 } } %>Please refine the filter criteria and press "Filter", or select the comments you would like to delete and press "Delete".
Note: The deleted comments will not be recorded into change history of their issue.