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, java.io.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, setComment, setCommentLevel, setFieldValuesHolder, setGroupLevel |
Methods inherited from class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction |
cameFromIssue, cameFromParent, getId, getIssue, getIssueObject, getIssueObjectNoSecurityCheck, getIssuePath, getKey, getLayoutBean, getParentIssueObject, getProject, getSecurityLevel, getSecurityLevel, getSecurityLevelName, getSubTaskManager, getSummaryIssue, getViewIssueKey, getViewUrl, isEditable, isEditable, isHasEditIssuePermission, isIssueExists, isIssueValid, isSubTaskCreatable, isWorkflowAllowsEdit, redirectToView, resetIssue, setId, setIssue, setKey, setViewIssueKey |
Methods inherited from class com.atlassian.jira.web.action.IssueActionSupport |
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, isFieldHidden, isTimeTrackingEnabled, setCurrentIssue, setSearchRequest, setSelectedIssueId, updateSearchRequest |
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport |
addErrorCollection, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, forceRedirect, getApplicationProperties, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConglomerateCookieValue, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getJiraServiceContext, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRandomHint, getRedirect, getRedirectChecker, getRemoteUser, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getText, getTimeFormat, getUriValidator, getUserFullName, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, htmlEncode, insertContextPath, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isInlineDialogMode, isSystemAdministrator, isUserExists, returnComplete, returnComplete, returnCompleteWithInlineRedirect, setConglomerateCookieValue, setInline, setReturnUrl, setSelectedProjectId |
Methods inherited from class com.atlassian.jira.action.JiraActionSupport |
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getDefaultResourceBundle, getDelegator, getKeysForPrefix, getLocale, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText0, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, removeKeyOrAddError |
Methods inherited from class webwork.action.ActionSupport |
addError, addErrorMessage, 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 java.lang.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(IssueLinkManager issueLinkManager,
SubTaskManager subTaskManager,
ConstantsManager constantsManager,
WorkflowManager workflowManager,
FieldManager fieldManager,
FieldLayoutManager fieldLayoutManager,
IssueFactory issueFactory,
FieldScreenRendererFactory fieldScreenRendererFactory,
CommentService commentService)
doExecute
protected java.lang.String doExecute()
throws java.lang.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:
java.lang.Exception
doDefault
public java.lang.String doDefault()
throws java.lang.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:
java.lang.Exception
doValidation
protected void doValidation()
- Overrides:
doValidation
in class AbstractCommentableAssignableIssue
redirectToSessionTimeoutPage
protected java.lang.String redirectToSessionTimeoutPage()
validateAttachmentMove
protected void validateAttachmentMove()
validateCreateIssue
protected void validateCreateIssue()
throws org.ofbiz.core.entity.GenericEntityException
- Throws:
org.ofbiz.core.entity.GenericEntityException
getTargetPid
public java.lang.Long getTargetPid()
getTargetStatusId
public java.lang.String getTargetStatusId()
getTargetProject
public org.ofbiz.core.entity.GenericValue getTargetProject()
getTargetIssueTypeGV
public org.ofbiz.core.entity.GenericValue getTargetIssueTypeGV()
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(java.lang.Long projectId,
java.lang.String issueTypeId)
throws WorkflowException
- Throws:
WorkflowException
getCurrentStatusGV
public org.ofbiz.core.entity.GenericValue getCurrentStatusGV()
getTargetIssueType
public java.lang.String getTargetIssueType()
getCurrentIssueType
public java.lang.String getCurrentIssueType()
getAllowedProjects
public java.util.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 java.util.Collection getTargetWorkflowStatuses(java.lang.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(java.lang.String currentIssueTypeId,
java.lang.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 java.util.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 java.util.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 java.lang.String getPrefixTaskStatusId(java.lang.String taskTypeId,
java.lang.String taskStatusId)
getPrefixIssueTypeId
public java.lang.String getPrefixIssueTypeId(java.lang.String issueType)
getSubTaskTargetStatus
public java.lang.String getSubTaskTargetStatus(java.lang.String taskTypeId,
java.lang.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(java.lang.String typeId,
java.lang.String statusId)
throws WorkflowException
- Throws:
WorkflowException
getTaskInvalidStatuses
public java.util.Collection getTaskInvalidStatuses(java.lang.String typeId)
throws WorkflowException
- Throws:
WorkflowException
getTasksWithStatus
public java.util.Collection getTasksWithStatus(java.lang.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(java.lang.String targetStatusId)
getBeanTargetStatusId
public java.lang.String getBeanTargetStatusId()
getFieldHtml
public java.lang.String getFieldHtml(java.lang.String fieldId)
throws java.lang.Exception
- Throws:
java.lang.Exception
getViewHtmlParams
protected java.util.Map getViewHtmlParams()
getIssueObject
public MutableIssue getIssueObject(org.ofbiz.core.entity.GenericValue issue)
getFieldManager
protected FieldManager getFieldManager()
getSubtaskTargetIssueType
public java.lang.String getSubtaskTargetIssueType(java.lang.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-2011 Atlassian. All Rights Reserved.