com.atlassian.jira.web.action.issue
Class MoveIssue
java.lang.Object
webwork.action.ActionSupport
com.atlassian.jira.action.JiraActionSupport
com.atlassian.jira.web.action.JiraWebActionSupport
com.atlassian.jira.web.action.ProjectActionSupport
com.atlassian.jira.web.action.IssueActionSupport
com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
com.atlassian.jira.web.action.issue.AbstractViewIssue
com.atlassian.jira.web.action.issue.AbstractCommentableIssue
com.atlassian.jira.web.action.issue.AbstractCommentableAssignableIssue
com.atlassian.jira.web.action.issue.MoveIssue
- All Implemented Interfaces:
- OperationContext, ErrorCollection, I18nHelper, Assignable, IssueSummaryAware, AuthorizationSupport, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
- Direct Known Subclasses:
- MoveIssueSubtasks, MoveIssueUpdateFields, MoveIssueUpdateWorkflow, MoveSubTask, MoveSubTaskChooseOperation, MoveSubTaskParent
public class MoveIssue
- extends AbstractCommentableAssignableIssue
- See Also:
- Serialized Form
Fields inherited from class webwork.action.ActionSupport |
command, errorMap, errorMessages |
Fields inherited from interface webwork.action.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Methods inherited from class com.atlassian.jira.web.action.issue.AbstractCommentableIssue |
createComment, doCommentValidation, getComment, getCommentLevel, getDisplayParams, getFieldScreenRendererLayoutItemForField, getFieldScreenRendererWithAllFields, getFieldValuesHolder, getGroupLevel, getGroupLevels, getIssueOperation, getOrderableField, getRoleLevels, populateCommentFields, setComment, setCommentLevel, setFieldValuesHolder, setGroupLevel |
Methods inherited from class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction |
addErrorMessage, assertIssueIsValid, cameFromIssue, cameFromParent, getId, getIssue, getIssueObject, getIssueObjectWithoutDatabaseRead, getIssuePath, getKey, getLayoutBean, getParentIssueObject, getProject, getSecurityLevel, getSubTaskManager, getSummaryIssue, getViewIssueKey, getViewUrl, isEditable, isEditable, isHasEditIssuePermission, isIssueExists, isIssueValid, isSubTaskCreatable, isWorkflowAllowsEdit, redirectToView, refreshIssueObject, setId, setIssueObject, setKey, setViewIssueKey |
Methods inherited from class com.atlassian.jira.web.action.IssueActionSupport |
addIssueToHistory, clearSelectedIssue, getAttachmentManager, getCurrentFailedLoginCount, getCurrentJQL, getCustomFieldManager, getDaysPerWeek, getEverLoggedIn, getHoursPerDay, getIssueManager, getLastFailedLogin, getLastLogin, getLoginCount, getPossibleVersions, getPossibleVersionsReleasedFirst, getPrettyDuration, getPreviousLogin, getSearchRequest, getSelectedIssueId, getSessionPagerFilterManager, getSessionSearchRequestManager, getSessionSearchRequestManagerFactory, getSessionSelectedIssueManager, getTotalFailedLoginCount, getUrlEncoded, getWorkflow, getWorkflowTransitionDescription, getWorkflowTransitionDisplayName, isCustomFieldHidden, isElevatedSecurityCheckRequired, isFieldHidden, isFieldHidden, isTimeTrackingEnabled, setSearchRequest, setSelectedIssueId, updateSearchRequest |
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport |
addError, addErrorCollection, addErrorMessage, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, addReason, addReasons, forceRedirect, getAdministratorContactLink, getApplicationProperties, getConglomerateCookieValue, getDateFormat, getDateTimeFormat, getDateTimeFormatter, getDescTranslation, getDmyDateFormatter, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getJiraContactHelper, getJiraServiceContext, getLanguage, getLoggedInUser, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getRandomHint, getReasons, getRedirect, getRedirectChecker, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getTimeFormat, getUriValidator, getUserFullName, getUserManager, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, htmlEncode, insertContextPath, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isInlineDialogMode, isSystemAdministrator, isUserExists, returnComplete, returnComplete, returnCompleteWithInlineRedirect, returnCompleteWithInlineRedirectAndMsg, returnMsgToUser, setConglomerateCookieValue, setInline, setReasons, setReturnUrl, setSelectedProjectId |
Methods inherited from class com.atlassian.jira.action.JiraActionSupport |
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getDelegator, getI18nHelper, getKeysForPrefix, getLocale, getOfBizDelegator, getRemoteUser, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isIndexing, removeKeyOrAddError |
Methods inherited from class webwork.action.ActionSupport |
addError, getCommandName, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface webwork.action.CommandDriven |
getCommandName, setCommand |
SUBTASK_STATUS_PREFIX
public static final String SUBTASK_STATUS_PREFIX
- See Also:
- Constant Field Values
constantsManager
protected final ConstantsManager constantsManager
workflowManager
protected final WorkflowManager workflowManager
fieldManager
protected final FieldManager fieldManager
fieldLayoutManager
protected final FieldLayoutManager fieldLayoutManager
issueFactory
protected final IssueFactory issueFactory
MoveIssue
public MoveIssue(SubTaskManager subTaskManager,
ConstantsManager constantsManager,
WorkflowManager workflowManager,
FieldManager fieldManager,
FieldLayoutManager fieldLayoutManager,
IssueFactory issueFactory,
FieldScreenRendererFactory fieldScreenRendererFactory,
CommentService commentService,
UserUtil userUtil)
doExecute
protected String doExecute()
throws Exception
- Handles the request to submit the input from the first step of the wizard, the submitted information is the target
project and the target issue type.
If the issue has sub-tasks it redirects to MoveIssueSubtasks.doDefault()
so that the tasks issue types can be mapped; otherwise, it redirects to
MoveIssueUpdateWorkflow.doDefault()
- Overrides:
doExecute
in class webwork.action.ActionSupport
- Returns:
- It actually doesn't return anything. If the issue has sub-tasks it redirects to
MoveIssueSubtasks.doDefault()
so that the tasks issue types can be mapped; otherwise, it redirects to
MoveIssueUpdateWorkflow.doDefault()
- Throws:
Exception
doDefault
public String doDefault()
throws Exception
- Handles the initial request to move an issue. It returns the view responsible for rendering the first step of the
wizard, if the user is authorised to perform the move and if the issue exists.
- Overrides:
doDefault
in class AbstractCommentableAssignableIssue
- Returns:
- "securitybreach" if the user is not authorised to move the issue;
Action.ERROR
if
the issue can't be found (which means it was probably deleted), or if the user isn't authorised to browse the
issue; otherwise, Action.INPUT
} is returned to render the view for the first step of the
wizard.
- Throws:
Exception
doValidation
protected void doValidation()
- Overrides:
doValidation
in class AbstractCommentableAssignableIssue
redirectToSessionTimeoutPage
protected String redirectToSessionTimeoutPage()
validateAttachmentMove
protected void validateAttachmentMove()
validateCreateIssue
protected void validateCreateIssue()
throws org.ofbiz.core.entity.GenericEntityException
- Throws:
org.ofbiz.core.entity.GenericEntityException
getTargetPid
public Long getTargetPid()
getTargetStatusId
public String getTargetStatusId()
getTargetProject
public org.ofbiz.core.entity.GenericValue getTargetProject()
getTargetProjectObj
public Project getTargetProjectObj()
getTargetIssueTypeGV
public org.ofbiz.core.entity.GenericValue getTargetIssueTypeGV()
getTargetIssueTypeObject
public IssueType getTargetIssueTypeObject()
getTargetWorkflow
public JiraWorkflow getTargetWorkflow()
throws WorkflowException
- Throws:
WorkflowException
getCurrentWorkflow
public JiraWorkflow getCurrentWorkflow()
throws WorkflowException,
org.ofbiz.core.entity.GenericEntityException
- Throws:
WorkflowException
org.ofbiz.core.entity.GenericEntityException
getWorkflowForType
public JiraWorkflow getWorkflowForType(Long projectId,
String issueTypeId)
throws WorkflowException
- Throws:
WorkflowException
getCurrentStatusGV
public org.ofbiz.core.entity.GenericValue getCurrentStatusGV()
getTargetIssueType
public String getTargetIssueType()
getCurrentIssueType
public String getCurrentIssueType()
getAllowedProjects
public Collection getAllowedProjects()
isSubTask
public boolean isSubTask()
- Description copied from class:
AbstractIssueSelectAction
- Determines whether the issue is a sub task - i.e. if it has any incoming sub-task issue links
- Overrides:
isSubTask
in class AbstractIssueSelectAction
- Returns:
- whether the issue is a sub task.
getTargetWorkflowStatuses
public Collection getTargetWorkflowStatuses(String issueTypeId)
- Retrieve a collection of target workflow statuses from the workflow associated with the specified issue type id.
- Parameters:
issueTypeId
- the id of the specified issue type.
- Returns:
- A collection of target workflow statuses from the workflow associated with the specified issue type id.
isWorkflowMatch
public boolean isWorkflowMatch(String currentIssueTypeId,
String targetIssueTypeId)
- Check if the workflow is the same for the current and target issue types
- Parameters:
currentIssueTypeId
- the id of the issue's current issue type.targetIssueTypeId
- the id of the target issue type.
- Returns:
- true if the workflows associated to the current and target issue types are the same; otherwise, false.
isHasSubTasks
public boolean isHasSubTasks()
- Checks if the current issue has sub-tasks.
- Returns:
- true if sub-tasks have been enabled and the current issue has sub-tasks; otherwise, false.
getSubTasks
public Collection getSubTasks()
- Retrieves the collection of sub-tasks associated with the current issue.
- Returns:
- The collection of sub-tasks associated with the current issue.
getSubTaskTypesUsed
public Collection getSubTaskTypesUsed()
- Gets the collection of sub-task types used in the sub-tasks associated with the current issue.
- Returns:
- The collection of sub-task types used in the sub-tasks associated with the current issue.
getPrefixTaskStatusId
public String getPrefixTaskStatusId(String taskTypeId,
String taskStatusId)
getPrefixIssueTypeId
public String getPrefixIssueTypeId(String issueType)
getSubTaskTargetStatus
public String getSubTaskTargetStatus(String taskTypeId,
String taskStatusId)
- Retrieve the task status associated with this type and current status.
- Parameters:
taskTypeId
- the id of the task type.taskStatusId
- the id of the task status.
- Returns:
- The task status associated with this type and current status.
isStatusChangeRequired
public boolean isStatusChangeRequired()
- Checks if the current statuses of the issue and its sub-tasks do not exist in the target workflow.
This is used to determine if step 2 requires input from the user, i.e. If all current statuses exist in the
target workflows - no input is needed.
- Returns:
- true if the current statuses of the issue and its sub-tasks do not exist in the target workflow;
otherwise, false.
isTaskStatusChangeRequired
public boolean isTaskStatusChangeRequired()
throws WorkflowException
- Throws:
WorkflowException
isIssueStatusValid
public boolean isIssueStatusValid()
throws WorkflowException
- Throws:
WorkflowException
isTaskStatusValid
public boolean isTaskStatusValid(String typeId,
String statusId)
throws WorkflowException
- Throws:
WorkflowException
getTaskInvalidStatuses
public Collection getTaskInvalidStatuses(String typeId)
throws WorkflowException
- Throws:
WorkflowException
getTasksWithStatus
public Collection getTasksWithStatus(String invalidStatusId)
throws WorkflowException
- Throws:
WorkflowException
getFieldLayoutManager
protected FieldLayoutManager getFieldLayoutManager()
getConstantsManager
public ConstantsManager getConstantsManager()
- Overrides:
getConstantsManager
in class JiraWebActionSupport
getWorkflowManager
protected WorkflowManager getWorkflowManager()
getMoveIssueBean
public MoveIssueBean getMoveIssueBean()
setBeanTargetStatusId
public void setBeanTargetStatusId(String targetStatusId)
getBeanTargetStatusId
public String getBeanTargetStatusId()
getFieldHtml
public String getFieldHtml(String fieldId)
throws Exception
- Throws:
Exception
getViewHtmlParams
protected Map getViewHtmlParams()
getIssueObject
public MutableIssue getIssueObject(org.ofbiz.core.entity.GenericValue issue)
getFieldManager
protected FieldManager getFieldManager()
getSubtaskTargetIssueType
public String getSubtaskTargetIssueType(String subtaskIssueType)
- Get the target issue type for a migrating issue type.
NOTE: This is currently used solely in moveissue-updateworkflow.jsp to construct a dropdown of statuses
for the subtask target issue type.
- Parameters:
subtaskIssueType
- the current issue type id
- Returns:
- the target issue type id
Copyright © 2002-2012 Atlassian. All Rights Reserved.