public class

MoveIssue

extends AbstractCommentableAssignableIssue
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
Known Direct Subclasses
Known Indirect Subclasses

Summary

Constants
String SUBTASK_STATUS_PREFIX
[Expand]
Inherited Constants
From class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
From class com.atlassian.jira.web.action.JiraWebActionSupport
From interface webwork.action.Action
Fields
protected final ConstantsManager constantsManager
protected final FieldLayoutManager fieldLayoutManager
protected final FieldManager fieldManager
protected final IssueFactory issueFactory
protected final WorkflowManager workflowManager
[Expand]
Inherited Fields
From class com.atlassian.jira.web.action.issue.AbstractCommentableIssue
From class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
From class com.atlassian.jira.web.action.IssueActionSupport
From class com.atlassian.jira.web.action.ProjectActionSupport
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
Public Constructors
MoveIssue(SubTaskManager subTaskManager, ConstantsManager constantsManager, WorkflowManager workflowManager, FieldManager fieldManager, FieldLayoutManager fieldLayoutManager, IssueFactory issueFactory, FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService, UserUtil userUtil)
Public Methods
String doDefault()
Handles the initial request to move an issue.
Collection getAllowedProjects()
String getBeanTargetStatusId()
ConstantsManager getConstantsManager()
String getCurrentIssueType()
Status getCurrentStatus()
Status getCurrentStatusObject()
JiraWorkflow getCurrentWorkflow()
String getFieldHtml(String fieldId)
MutableIssue getIssueObject(GenericValue issue)
MoveIssueBean getMoveIssueBean()
String getPrefixIssueTypeId(String issueType)
String getPrefixTaskStatusId(String taskTypeId, String taskStatusId)
String getSubTaskTargetStatus(String taskTypeId, String taskStatusId)
Retrieve the task status associated with this type and current status.
Collection<GenericValue> getSubTaskTypesUsed()
Gets the collection of sub-task types used in the sub-tasks associated with the current issue.
Collection<GenericValue> getSubTasks()
Retrieves the collection of sub-tasks associated with the current issue.
String getSubtaskTargetIssueType(String subtaskIssueType)
Get the target issue type for a migrating issue type.
String getTargetIssueType()
IssueType getTargetIssueTypeObject()
Long getTargetPid()
Project getTargetProjectObj()
String getTargetStatusId()
JiraWorkflow getTargetWorkflow()
Collection<Status> getTargetWorkflowStatuses(String issueTypeId)
Retrieve a collection of target workflow statuses from the workflow associated with the specified issue type id.
Collection getTaskInvalidStatusObjects(String typeId)
Collection<Status> getTaskInvalidStatuses(String typeId)
Collection getTasksWithStatus(String invalidStatusId)
JiraWorkflow getWorkflowForType(Long projectId, String issueTypeId)
boolean isHasSubTasks()
Checks if the current issue has sub-tasks.
boolean isIssueStatusValid()
boolean isStatusChangeRequired()
Checks if the current statuses of the issue and its sub-tasks do not exist in the target workflow.
boolean isSubTask()
Determines whether the issue is a sub task - i.e.
boolean isTaskStatusChangeRequired()
boolean isTaskStatusValid(String typeId, String statusId)
boolean isWorkflowMatch(String currentIssueTypeId, String targetIssueTypeId)
Check if the workflow is the same for the current and target issue types
void setBeanTargetStatusId(String targetStatusId)
Protected Methods
String doExecute()
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.
void doValidation()
FieldLayoutManager getFieldLayoutManager()
FieldManager getFieldManager()
Map getViewHtmlParams()
WorkflowManager getWorkflowManager()
String redirectToSessionTimeoutPage()
void validateAttachmentMove()
void validateCreateIssue()
[Expand]
Inherited Methods
From class com.atlassian.jira.web.action.issue.AbstractCommentableAssignableIssue
From class com.atlassian.jira.web.action.issue.AbstractCommentableIssue
From class com.atlassian.jira.web.action.issue.AbstractViewIssue
From class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
From class com.atlassian.jira.web.action.IssueActionSupport
From class com.atlassian.jira.web.action.ProjectActionSupport
From class com.atlassian.jira.web.action.JiraWebActionSupport
From class com.atlassian.jira.action.JiraActionSupport
From class webwork.action.ActionSupport
From class java.lang.Object
From interface com.atlassian.jira.issue.customfields.OperationContext
From interface com.atlassian.jira.util.ErrorCollection
From interface com.atlassian.jira.util.I18nHelper
From interface com.atlassian.jira.web.HttpServletVariables
From interface com.atlassian.jira.web.action.issue.Assignable
From interface com.atlassian.jira.web.action.issue.IssueSummaryAware
From interface com.atlassian.jira.web.util.AuthorizationSupport
From interface webwork.action.Action
From interface webwork.action.CommandDriven
From interface webwork.action.IllegalArgumentAware

Constants

public static final String SUBTASK_STATUS_PREFIX

Constant Value: "subtaskstatus_"

Fields

protected final ConstantsManager constantsManager

protected final FieldLayoutManager fieldLayoutManager

protected final FieldManager fieldManager

protected final IssueFactory issueFactory

protected final WorkflowManager workflowManager

Public Constructors

public MoveIssue (SubTaskManager subTaskManager, ConstantsManager constantsManager, WorkflowManager workflowManager, FieldManager fieldManager, FieldLayoutManager fieldLayoutManager, IssueFactory issueFactory, FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService, UserUtil userUtil)

Public Methods

public String doDefault ()

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.

Returns
  • "securitybreach" if the user is not authorised to move the issue; 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, INPUT} is returned to render the view for the first step of the wizard.
Throws
Exception

public Collection getAllowedProjects ()

public String getBeanTargetStatusId ()

public ConstantsManager getConstantsManager ()

public String getCurrentIssueType ()

public Status getCurrentStatus ()

public Status getCurrentStatusObject ()

public JiraWorkflow getCurrentWorkflow ()

Throws
GenericEntityException
WorkflowException

public String getFieldHtml (String fieldId)

Throws
Exception

public MutableIssue getIssueObject (GenericValue issue)

public MoveIssueBean getMoveIssueBean ()

public String getPrefixIssueTypeId (String issueType)

public String getPrefixTaskStatusId (String taskTypeId, String taskStatusId)

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.

public Collection<GenericValue> 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.

public Collection<GenericValue> getSubTasks ()

Retrieves the collection of sub-tasks associated with the current issue.

Returns
  • The collection of sub-tasks associated with the current issue.

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

public String getTargetIssueType ()

public IssueType getTargetIssueTypeObject ()

public Long getTargetPid ()

public Project getTargetProjectObj ()

public String getTargetStatusId ()

public JiraWorkflow getTargetWorkflow ()

public Collection<Status> 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.

public Collection getTaskInvalidStatusObjects (String typeId)

public Collection<Status> getTaskInvalidStatuses (String typeId)

public Collection getTasksWithStatus (String invalidStatusId)

public JiraWorkflow getWorkflowForType (Long projectId, String issueTypeId)

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.

public boolean isIssueStatusValid ()

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.

public boolean isSubTask ()

Determines whether the issue is a sub task - i.e. if it has any incoming sub-task issue links

Returns
  • whether the issue is a sub task.

public boolean isTaskStatusChangeRequired ()

public boolean isTaskStatusValid (String typeId, String statusId)

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.

public void setBeanTargetStatusId (String targetStatusId)

Protected Methods

protected String doExecute ()

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 doDefault() so that the tasks issue types can be mapped; otherwise, it redirects to doDefault()

Returns
  • It actually doesn't return anything. If the issue has sub-tasks it redirects to doDefault() so that the tasks issue types can be mapped; otherwise, it redirects to doDefault()
Throws
Exception

protected void doValidation ()

protected FieldLayoutManager getFieldLayoutManager ()

protected FieldManager getFieldManager ()

protected Map getViewHtmlParams ()

protected WorkflowManager getWorkflowManager ()

protected String redirectToSessionTimeoutPage ()

protected void validateAttachmentMove ()

protected void validateCreateIssue ()

Throws
GenericEntityException