public class

BulkMoveOperationImpl

extends AbstractBulkOperation
implements BulkMoveOperation
java.lang.Object
   ↳ com.atlassian.jira.bulkedit.operation.AbstractBulkOperation
     ↳ com.atlassian.jira.bulkedit.operation.BulkMoveOperationImpl

Class Overview

Operatin for moving parent and their sub-takks issues from one or many contexts to a single target context.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.bulkedit.operation.BulkMoveOperation
Fields
protected static final Logger log
Public Constructors
BulkMoveOperationImpl(WorkflowManager workflowManager, ProjectManager projectManager, FieldManager fieldManager, IssueFactory issueFactory, IssueManager issueManager, IssueEventManager issueEventManager, BulkEditBeanSessionHelper bulkEditBeanSessionHelper, AttachmentManager attachmentManager)
Public Methods
boolean canPerform(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
Determines whether the operation can be performed with the given set of issues
boolean canPerform(BulkEditBean bulkEditBean, User remoteUser)
Determines whether the operation can be performed with the given set of issues
@Deprecated void chooseContext(BulkEditBean bulkEditBean, User remoteUser, I18nHelper i18nHelper, ErrorCollection errors)
void chooseContext(BulkEditBean bulkEditBean, ApplicationUser applicationUser, I18nHelper i18nHelper, ErrorCollection errors)
void chooseContextNoValidate(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
@Deprecated void chooseContextNoValidate(BulkEditBean bulkEditBean, User remoteUser)
void finishChooseContext(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
Does operations on the given BulkEditBean to finalise the "Choose Project and Issue Type" step of the Bulk Move.
@Deprecated void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean, User remoteUser)
Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.
void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean, ApplicationUser applicationUser)
Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.
@Deprecated void finishChooseContext(BulkEditBean bulkEditBean, User remoteUser)
Does operations on the given BulkEditBean to finalise the "Choose Project and Issue Type" step of the Bulk Move.
String getCannotPerformMessageKey()
An i18n key to be used to render the error message to be displayed when the user can not perform this bulk operation.
String getDescriptionKey()
String getFieldName(Field field, I18nHelper i18nHelper)
String getNameKey()
An i18n key used to display a short description of this operation in the UI.
String getOperationName()
Returns the "operation name".
JiraWorkflow getWorkflowForType(Long projectId, String issueTypeId)
boolean isStatusValid(BulkEditBean bulkEditBean)
void moveIssuesAndIndex(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
@Deprecated void moveIssuesAndIndex(BulkEditBean bulkEditBean, User remoteUser)
void perform(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
Performs the operation on the given set of issues
void perform(BulkEditBean bulkEditBean, User remoteUser)
Performs the operation on the given set of issues
void setStatusFields(BulkEditBean bulkEditBean)
void validatePopulateFields(BulkEditBean bulkEditBean, ErrorCollection errors, I18nHelper i18nHelper)
Protected Methods
Collection<Field> getTargetHiddenFields(BulkEditBean bulkEditBean)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.bulkedit.operation.BulkMoveOperation
From interface com.atlassian.jira.bulkedit.operation.BulkOperation
From interface com.atlassian.jira.issue.operation.IssueOperation

Fields

protected static final Logger log

Public Constructors

public BulkMoveOperationImpl (WorkflowManager workflowManager, ProjectManager projectManager, FieldManager fieldManager, IssueFactory issueFactory, IssueManager issueManager, IssueEventManager issueEventManager, BulkEditBeanSessionHelper bulkEditBeanSessionHelper, AttachmentManager attachmentManager)

Public Methods

public boolean canPerform (BulkEditBean bulkEditBean, ApplicationUser applicationUser)

Determines whether the operation can be performed with the given set of issues

public boolean canPerform (BulkEditBean bulkEditBean, User remoteUser)

Determines whether the operation can be performed with the given set of issues

@Deprecated public void chooseContext (BulkEditBean bulkEditBean, User remoteUser, I18nHelper i18nHelper, ErrorCollection errors)

public void chooseContext (BulkEditBean bulkEditBean, ApplicationUser applicationUser, I18nHelper i18nHelper, ErrorCollection errors)

public void chooseContextNoValidate (BulkEditBean bulkEditBean, ApplicationUser applicationUser)

@Deprecated public void chooseContextNoValidate (BulkEditBean bulkEditBean, User remoteUser)

public void finishChooseContext (BulkEditBean bulkEditBean, ApplicationUser applicationUser)

Does operations on the given BulkEditBean to finalise the "Choose Project and Issue Type" step of the Bulk Move.

This method should be called AFTER validation of the new context, and re-mapping the BulkEditBeans to be indexed by Target context.

  • Sets the target field layout (aka "Field Configuration") according to target Project and Issue Type.
  • Decides which Issue Fields need to be edited by the user.
  • Will delete values for fields that should be removed (ie not used in new context).
  • Sets the SubTaskBulkEditBean if any of these issues have subtasks which will also need to be moved.

Parameters
bulkEditBean BulkEditBean containing Bulk Move information for a single target "Issue Context".
applicationUser User doing the operation.

@Deprecated public void finishChooseContext (MultiBulkMoveBean multiBulkMoveBean, User remoteUser)

Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.

Parameters
multiBulkMoveBean MultiBulkMoveBean (Contains Collection of BulkEditBean objects).
remoteUser User

public void finishChooseContext (MultiBulkMoveBean multiBulkMoveBean, ApplicationUser applicationUser)

Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.

Parameters
multiBulkMoveBean MultiBulkMoveBean (Contains Collection of BulkEditBean objects).
applicationUser User

@Deprecated public void finishChooseContext (BulkEditBean bulkEditBean, User remoteUser)

Does operations on the given BulkEditBean to finalise the "Choose Project and Issue Type" step of the Bulk Move.

This method should be called AFTER validation of the new context, and re-mapping the BulkEditBeans to be indexed by Target context.

  • Sets the target field layout (aka "Field Configuration") according to target Project and Issue Type.
  • Decides which Issue Fields need to be edited by the user.
  • Will delete values for fields that should be removed (ie not used in new context).
  • Sets the SubTaskBulkEditBean if any of these issues have subtasks which will also need to be moved.

Parameters
bulkEditBean BulkEditBean containing Bulk Move information for a single target "Issue Context".
remoteUser User doing the operation.

public String getCannotPerformMessageKey ()

An i18n key to be used to render the error message to be displayed when the user can not perform this bulk operation.

Returns
  • An i18n key to be used to render the error message to be displayed when the user can not perform this bulk operation.

public String getDescriptionKey ()

public String getFieldName (Field field, I18nHelper i18nHelper)

public String getNameKey ()

An i18n key used to display a short description of this operation in the UI. e.g " Watch Issues "

Returns
  • An i18n key used to display a short description of this operation in the UI

public String getOperationName ()

Returns the "operation name".

This is used to build up the name of the action used to render the details screen in the bulk change UI.

The action name that is generated as operationName + "Details.jspa". See BulkChooseOperation for details

Returns
  • The "operation name"

public JiraWorkflow getWorkflowForType (Long projectId, String issueTypeId)

public boolean isStatusValid (BulkEditBean bulkEditBean)

public void moveIssuesAndIndex (BulkEditBean bulkEditBean, ApplicationUser applicationUser)

Throws
Exception

@Deprecated public void moveIssuesAndIndex (BulkEditBean bulkEditBean, User remoteUser)

Throws
Exception

public void perform (BulkEditBean bulkEditBean, ApplicationUser applicationUser)

Performs the operation on the given set of issues

Throws
Exception

public void perform (BulkEditBean bulkEditBean, User remoteUser)

Performs the operation on the given set of issues

Throws
Exception

public void setStatusFields (BulkEditBean bulkEditBean)

public void validatePopulateFields (BulkEditBean bulkEditBean, ErrorCollection errors, I18nHelper i18nHelper)

Protected Methods

protected Collection<Field> getTargetHiddenFields (BulkEditBean bulkEditBean)