public class

MoveIssueUpdateFields

extends MoveIssue
implements OperationContext
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
                       ↳ com.atlassian.jira.web.action.issue.MoveIssueUpdateFields
Known Direct Subclasses

Summary

[Expand]
Inherited Constants
From class com.atlassian.jira.web.action.issue.MoveIssue
From class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
From class com.atlassian.jira.web.action.JiraWebActionSupport
From interface webwork.action.Action
[Expand]
Inherited Fields
From class com.atlassian.jira.web.action.issue.MoveIssue
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
MoveIssueUpdateFields(SubTaskManager subTaskManager, ConstantsManager constantsManager, WorkflowManager workflowManager, FieldManager fieldManager, FieldLayoutManager fieldLayoutManager, IssueFactory issueFactory, FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService, IssueSecurityHelper issueSecurityHelper, UserUtil userUtil)
Public Methods
String doDefault()
Handles the initial request to move an issue.
Map getCustomFieldValuesHolder()
String getFieldHtml(FieldLayoutItem fieldLayoutItem)
String getFieldName(Field field)
Collection getMoveFieldLayoutItems()
Collection getTargetCustomFields()
Retrieve the custom fields that are applicable in the target destination.
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()
Collection<CustomField> getCurrentCustomFieldObjects(String issueTypeId)
Retrieve a collection of custom field objects associated with the specified issue type.
Collection<CustomField> getTargetCustomFieldObjects(String targetIssueTypeId)
Returns a collection of target custom field objects.
FieldLayout getTargetFieldLayout()
Collection getTargetHiddenFields()
MutableIssue getTargetIssueObject()
Retrieves the issue from the IssueManager and updates the Project and IssueType, and possibly clears the security.
MutableIssue getTargetIssueObjectWithSecurityLevel()
Retrieves the issue from the IssueManager and updates the Project and IssueType.
boolean isShouldCheckFieldValue(Issue origIssue, Field field)
JRA-12671 - need to determine if we should call hasValue on the field.
void popluateDefault(OrderableField orderableField)
void populateFromParams(OrderableField orderableField)
[Expand]
Inherited Methods
From class com.atlassian.jira.web.action.issue.MoveIssue
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

Public Constructors

public MoveIssueUpdateFields (SubTaskManager subTaskManager, ConstantsManager constantsManager, WorkflowManager workflowManager, FieldManager fieldManager, FieldLayoutManager fieldLayoutManager, IssueFactory issueFactory, FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService, IssueSecurityHelper issueSecurityHelper, 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.

public Map getCustomFieldValuesHolder ()

public String getFieldHtml (FieldLayoutItem fieldLayoutItem)

public String getFieldName (Field field)

public Collection getMoveFieldLayoutItems ()

public Collection getTargetCustomFields ()

Retrieve the custom fields that are applicable in the target destination.

Returns
  • A collection of the custom fields that are applicable in the target destination.

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 Collection<CustomField> getCurrentCustomFieldObjects (String issueTypeId)

Retrieve a collection of custom field objects associated with the specified issue type.

Parameters
issueTypeId the id of the issue type.
Returns
  • A collection of custom field objects associated with the specified issue type.

protected Collection<CustomField> getTargetCustomFieldObjects (String targetIssueTypeId)

Returns a collection of target custom field objects.

Parameters
targetIssueTypeId the id of the target issue type.
Returns
  • a collection of target custom field objects.

protected FieldLayout getTargetFieldLayout ()

protected Collection getTargetHiddenFields ()

protected MutableIssue getTargetIssueObject ()

Retrieves the issue from the IssueManager and updates the Project and IssueType, and possibly clears the security.

JRA-11605 - we need this method so that the display can prompt the user with values from system fields that are unencumbered by security level permission checks. It will set security level to null if the issue is moving somewhere that the old security level is no relevant.

Returns
  • Target Issue Object with required Project and Issue Type added in.

protected MutableIssue getTargetIssueObjectWithSecurityLevel ()

Retrieves the issue from the IssueManager and updates the Project and IssueType. The security level setting is left in place - see getTargetIssueObject() for an alternative method.

Returns
  • Issue Object with required Project and Issue Type added in.

protected boolean isShouldCheckFieldValue (Issue origIssue, Field field)

JRA-12671 - need to determine if we should call hasValue on the field. For calculated custom fields, that are not in scope this isn't the case. This should prevent us from calling hasValue on calculated custom fields.

protected to make it testable.

Parameters
origIssue The original issue in which we'll check the context
field The field in question.
Returns
  • true, if the field is not a custom value, or it is in scope in the original issue.

protected void popluateDefault (OrderableField orderableField)

protected void populateFromParams (OrderableField orderableField)