@PublicApi public interface

BulkEditBean

implements OperationContext SingleIssueModeEditBean
com.atlassian.jira.web.bean.BulkEditBean
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Used in the BulkEdit Wizard Stores in session: currentStep action selected and values associated with that action issues selected

Summary

Constants
String BULKEDIT_PREFIX
String BULK_DELETE
String BULK_DELETE_OP
String BULK_EDIT_OP
String BULK_MOVE_OP
String SUBTASK_STATUS_INFO
Public Methods
void addAvailablePreviousStep(int stepId)
void addIssues(Collection<Issue> issues)
void addRetainValue(String fieldId)
void addTransitionErrors(String issueKey, Collection<String> errors)
void clearAvailablePreviousSteps()
@Deprecated Map<StringBulkEditAction> getActions()
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
@ExperimentalApi BulkEditMultiSelectFieldBean getBulkEditMultiSelectFieldBean()
Returns BulkEditMultiSelectFieldBean which stores change mode options for multi select system fields (Affects Version/s, Fix Version/s, Labels, Components)
String getCheckboxName(Issue issue)
@Deprecated int getCurrentStep()
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
CustomField getCustomField(String customFieldKey)
String getCustomFieldView(CustomField customField)
Collection<FieldLayout> getFieldLayouts()
Returns all the unique field layouts of the selected issues
FieldScreenRenderer getFieldScreenRenderer()
Map<StringMap<LongLong>> getFieldSubstitutionMap()
Map<StringObject> getFieldValues()
Map<StringObject> getFieldValuesHolder()
Issue getFirstTargetIssueObject()
This method is used to get a target issue that will provide the correct context (i.e.
Set<Issue> getInvalidIssues()
Gets issues whose status is null
Collection<GenericValue> getInvalidStatuses()
Gets a set of invalid statuses that are not valid in the destination workflow
int getInvalidSubTaskCount()
Set<String> getInvalidSubTaskStatusesByType(String subTaskTypeId)
Set<String> getInvalidSubTaskTypes()
IssueOperation getIssueOperation()
IssueType getIssueType()
Collection<IssueType> getIssueTypeObjects()
Collection<String> getIssueTypes()
List<Issue> getIssuesFromSearchRequest()
Collection<?> getIssuesInUse()
String getKey()
Returns a string that represents a "unique" identifier for this bulke edit bean
int getMaxIssues()
If there is a limit on the number of issues that can be bulk edited, this will return that number, otherwise -1.
Map<?, ?> getMessagedFieldLayoutItems()
Collection<?> getMoveFieldLayoutItems()
String getOperationName()
Map<String, ?> getParams()
BulkEditBean getParentBulkEditBean()
@ExperimentalApi @Nullable String getParentIssueKey()
Gets the destination parent issue for issue->subtask conversion.
@ExperimentalApi @Nullable Issue getParentIssueObject()
returns object from database, the object is queried by getParentIssueKey().
Project getProject()
This method is deprecated. Use getSingleProject() instead. Since v5.2.
Collection<Long> getProjectIds()
returns a list of project ids for projects which the currently selected issues belong to.
Collection<Project> getProjectObjects()
@Deprecated Collection<GenericValue> getProjects()
This method is deprecated. Use getProjectObjects() instead. Since v5.2.
String getRedirectUrl()
Returns the redirect URL.
MultiBulkMoveBean getRelatedMultiBulkMoveBean()
Collection<?> getRemovedFields()
Set<String> getRetainValues()
@Deprecated List<Issue> getSelectedIssues()
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
@Deprecated List<Issue> getSelectedIssuesIncludingSubTasks()
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
String getSelectedTransitionName()
WorkflowTransitionKey getSelectedWFTransitionKey()
Project getSingleProject()
Returns the single Project if there is only one Project in this BulkEditBean, otherwise throws an IllegalStateException.
Map<StringString> getStatusMapHolder()
BulkEditBean getSubTaskBulkEditBean()
@Deprecated List<Issue> getSubTaskOfSelectedIssues()
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
Collection<String> getSubTaskStatusHolder()
FieldLayout getTargetFieldLayout()
FieldLayout getTargetFieldLayoutForType(String targetTypeId)
List<GenericValue> getTargetIssueGVs()
This is a convinience method for converting the list of objects to a list of GenericValues
Map<IssueIssue> getTargetIssueObjects()
IssueType getTargetIssueType()
String getTargetIssueTypeId()
IssueType getTargetIssueTypeObject()
Long getTargetPid()
Project getTargetProject()
Status getTargetStatus(Issue issue)
@Deprecated Status getTargetStatusObject(Issue issue)
This method is deprecated. Use getTargetStatusObject(com.atlassian.jira.issue.Issue) instead. Since v7.0
JiraWorkflow getTargetWorkflow()
JiraWorkflow getTargetWorkflowByType(String issueTypeId)
Map<StringCollection<String>> getTransitionErrors(Integer maxCount)
Get the transition errors after bulk issue transition
List<WorkflowTransitionKey> getTransitionIdsForWorkflow(String workflowName)
List<String> getTransitionIssueKeys(WorkflowTransitionKey workflowTransitionKey)
String getTransitionName(String workflowName, String actionDescriptorId)
MultiMap getWorkflowTransitionMap()
Set<String> getWorkflowsInUse()
void initMultiBulkBean()
void initMultiBulkBeanWithSubTasks()
@Deprecated void initSelectedIssues(Collection<Issue> selectedIssues)
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
boolean isAvailablePreviousStep(int stepId)
boolean isChecked(Issue issue)
boolean isHasMailServer()
Check if a mail server has been specified.
boolean isMultipleProjects()
boolean isMutipleIssueTypes()
boolean isOnlyContainsSubTasks()
boolean isRedirectUrlSet()
Whether the URL to return to has been set yet.
boolean isRetainChecked(String fieldId)
boolean isSendBulkNotification()
boolean isSubTaskCollection()
boolean isSubTaskOnly()
boolean isTranisitionErrorsLimited(Integer maxCount)
boolean isTransitionChecked(WorkflowTransitionKey workflowTransitionKey)
void populateStatusHolder()
void populateSubTaskStatusHolder()
void resetMoveData()
void resetWorkflowTransitionSelection()
@Deprecated void setActions(Map<StringBulkEditAction> actions)
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
@Deprecated void setCurrentStep(int currentStep)
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
void setFieldScreenRenderer(FieldScreenRenderer fieldScreenRenderer)
void setInvalidSubTaskStatusesByType(Map<StringSet<String>> invalidSubTaskStatusesByType)
void setInvalidSubTaskTypes(Set<String> invalidSubTaskTypes)
void setIssuesFromSearchRequest(List<Issue> issuesFromSearchRequest)
void setIssuesInUse(Collection<?> issuesInUse)
void setMaxIssues(int maxIssues)
Sets the maximum number of issues allowed to be bulk edited at once.
void setMessagedFieldLayoutItems(Map<?, ?> messagedFieldLayoutItems)
void setMoveFieldLayoutItems(Collection<?> moveFieldLayoutItems)
void setOperationName(String operationName)
void setParams(Map<String, ?> params)
void setParentBulkEditBean(BulkEditBean parentBulkEditBean)
If this BulkEditBean contains subtasks of another BulkEditBean, then we can set a pointer back to the BulkEditBean containing the parent issues.
@ExperimentalApi void setParentIssueKey(String parentIssueKey)
Sets the destination parent issue for issue->subtask conversion.
void setRedirectUrl(String redirectUrl)
Sets the URL to which user should be redirected once the bulk operation is finished.
void setRelatedMultiBulkMoveBean(MultiBulkMoveBean relatedMultiBulkMoveBean)
void setRemovedFields(Set<?> removedFields)
void setRetainValues(Set<String> retainValues)
void setSelectedWFTransitionKey(WorkflowTransitionKey workflowTransitionKey)
void setSendBulkNotification(boolean sendBulkNotification)
void setSubTaskBulkEditBean(BulkEditBean subTaskBulkEditBean)
@Deprecated void setSubTaskOfSelectedIssues(List<Issue> subTaskOfSelectedIssues)
This method is deprecated. Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.
void setTargetFieldLayout()
Sets the targetFieldLayout to the appropriate FieldLayout (aka "Field Configuration"); for the target Project and Issue Type.
void setTargetIssueObjects(Map<IssueIssue> targetIssueObjects)
void setTargetIssueTypeId(String id)
void setTargetProject(GenericValue project)
This method is deprecated. Use setTargetProject(com.atlassian.jira.project.Project) instead. Since v5.2.
void setTargetProject(Project project)
void setWorkflowTransitionMap(MultiMap workflowTransitionMap)
[Expand]
Inherited Methods
From interface com.atlassian.jira.issue.customfields.OperationContext
From interface com.atlassian.jira.web.bean.SingleIssueModeEditBean

Constants

public static final String BULKEDIT_PREFIX

Constant Value: "bulkedit_"

public static final String BULK_DELETE

Constant Value: "delete"

public static final String BULK_DELETE_OP

Constant Value: "bulk_delete_op"

public static final String BULK_EDIT_OP

Constant Value: "bulk_edit_op"

public static final String BULK_MOVE_OP

Constant Value: "bulk_move_op"

public static final String SUBTASK_STATUS_INFO

Constant Value: "subtaskstatusinfo_"

Public Methods

public void addAvailablePreviousStep (int stepId)

public void addIssues (Collection<Issue> issues)

public void addRetainValue (String fieldId)

public void addTransitionErrors (String issueKey, Collection<String> errors)

public void clearAvailablePreviousSteps ()

@Deprecated public Map<StringBulkEditAction> getActions ()

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

@ExperimentalApi public BulkEditMultiSelectFieldBean getBulkEditMultiSelectFieldBean ()

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Returns BulkEditMultiSelectFieldBean which stores change mode options for multi select system fields (Affects Version/s, Fix Version/s, Labels, Components)

Returns

public String getCheckboxName (Issue issue)

@Deprecated public int getCurrentStep ()

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

public CustomField getCustomField (String customFieldKey)

Throws
GenericEntityException

public String getCustomFieldView (CustomField customField)

public Collection<FieldLayout> getFieldLayouts ()

Returns all the unique field layouts of the selected issues

Returns
  • Collection of the FieldLayouts.

public FieldScreenRenderer getFieldScreenRenderer ()

public Map<StringMap<LongLong>> getFieldSubstitutionMap ()

public Map<StringObject> getFieldValues ()

public Map<StringObject> getFieldValuesHolder ()

public Issue getFirstTargetIssueObject ()

This method is used to get a target issue that will provide the correct context (i.e. project and issue type);, for where you are moving to. The object returned is not mapped to a specific selected issue.

Returns
  • an issue whose project and issue type are of where the you are moving to.

public Set<Issue> getInvalidIssues ()

Gets issues whose status is null

Returns
  • Set of Issue objects. Emoty Set if no invalid issues

public Collection<GenericValue> getInvalidStatuses ()

Gets a set of invalid statuses that are not valid in the destination workflow

Returns
  • Set of GenericValue objects

public int getInvalidSubTaskCount ()

public Set<String> getInvalidSubTaskStatusesByType (String subTaskTypeId)

public Set<String> getInvalidSubTaskTypes ()

public IssueOperation getIssueOperation ()

public IssueType getIssueType ()

public Collection<IssueType> getIssueTypeObjects ()

public Collection<String> getIssueTypes ()

public List<Issue> getIssuesFromSearchRequest ()

public Collection<?> getIssuesInUse ()

public String getKey ()

Returns a string that represents a "unique" identifier for this bulke edit bean

Returns
  • unique key formed from projects, issue types, target project if a subtask only bulkeditbean and size of the bean

public int getMaxIssues ()

If there is a limit on the number of issues that can be bulk edited, this will return that number, otherwise -1.

Returns
  • -1 to indicate no limit on bulk editing issues, otherwise the number of the limit.

public Map<?, ?> getMessagedFieldLayoutItems ()

public Collection<?> getMoveFieldLayoutItems ()

public String getOperationName ()

public Map<String, ?> getParams ()

public BulkEditBean getParentBulkEditBean ()

@ExperimentalApi @Nullable public String getParentIssueKey ()

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Gets the destination parent issue for issue->subtask conversion.

Returns
  • Destination parent issue key

@ExperimentalApi @Nullable public Issue getParentIssueObject ()

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

returns object from database, the object is queried by getParentIssueKey().

Returns

public Project getProject ()

This method is deprecated.
Use getSingleProject() instead. Since v5.2.

public Collection<Long> getProjectIds ()

returns a list of project ids for projects which the currently selected issues belong to.

Returns
  • A list of project ids for projects which the currently selected issues belong to.

public Collection<Project> getProjectObjects ()

@Deprecated public Collection<GenericValue> getProjects ()

This method is deprecated.
Use getProjectObjects() instead. Since v5.2.

@return

public String getRedirectUrl ()

Returns the redirect URL. See setRedirectUrl(String).

public MultiBulkMoveBean getRelatedMultiBulkMoveBean ()

public Collection<?> getRemovedFields ()

public Set<String> getRetainValues ()

@Deprecated public List<Issue> getSelectedIssues ()

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

Returns a list of "selected" issues. For the "top level" BulkEditBean this should be the actual issues chosen by the user for the bulk operation.

The Bulk Move operation will then break this list up in groups of project and issue type and store each of these types in its own BulkEditBean, so for these nested BulkEditBeans this list may be a subset of the original selected issues. Furthermore when moving parent issues to a new Project, we will have to move any subtasks as well. In this case a third level of BulkEditBean is created and these ones will have subtasks that may not have been explicitly selected by the user at all.

Returns
  • List of the Selected Issues

@Deprecated public List<Issue> getSelectedIssuesIncludingSubTasks ()

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

public String getSelectedTransitionName ()

public WorkflowTransitionKey getSelectedWFTransitionKey ()

public Project getSingleProject ()

Returns the single Project if there is only one Project in this BulkEditBean, otherwise throws an IllegalStateException.

Returns
  • the single Project if there is only one Project in this BulkEditBean, otherwise throws an IllegalStateException.

public Map<StringString> getStatusMapHolder ()

public BulkEditBean getSubTaskBulkEditBean ()

@Deprecated public List<Issue> getSubTaskOfSelectedIssues ()

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

public Collection<String> getSubTaskStatusHolder ()

public FieldLayout getTargetFieldLayout ()

public FieldLayout getTargetFieldLayoutForType (String targetTypeId)

public List<GenericValue> getTargetIssueGVs ()

This is a convinience method for converting the list of objects to a list of GenericValues

Returns
  • list of GenericValue issue objects

public Map<IssueIssue> getTargetIssueObjects ()

public IssueType getTargetIssueType ()

public String getTargetIssueTypeId ()

public IssueType getTargetIssueTypeObject ()

public Long getTargetPid ()

public Project getTargetProject ()

public Status getTargetStatus (Issue issue)

@Deprecated public Status getTargetStatusObject (Issue issue)

This method is deprecated.
Use getTargetStatusObject(com.atlassian.jira.issue.Issue) instead. Since v7.0

public JiraWorkflow getTargetWorkflow ()

public JiraWorkflow getTargetWorkflowByType (String issueTypeId)

public Map<StringCollection<String>> getTransitionErrors (Integer maxCount)

Get the transition errors after bulk issue transition

Parameters
maxCount max count of errors to return or null for no limits.
Returns
  • transition errors after bulk issue transition

public List<WorkflowTransitionKey> getTransitionIdsForWorkflow (String workflowName)

public List<String> getTransitionIssueKeys (WorkflowTransitionKey workflowTransitionKey)

public String getTransitionName (String workflowName, String actionDescriptorId)

public MultiMap getWorkflowTransitionMap ()

public Set<String> getWorkflowsInUse ()

public void initMultiBulkBean ()

public void initMultiBulkBeanWithSubTasks ()

@Deprecated public void initSelectedIssues (Collection<Issue> selectedIssues)

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

Initialises the BulkEditBean with the selected issues

Parameters
selectedIssues Required selected Issues.

public boolean isAvailablePreviousStep (int stepId)

public boolean isChecked (Issue issue)

public boolean isHasMailServer ()

Check if a mail server has been specified.

Returns
  • boolean true if a mail server has been specified

public boolean isMultipleProjects ()

public boolean isMutipleIssueTypes ()

public boolean isOnlyContainsSubTasks ()

public boolean isRedirectUrlSet ()

Whether the URL to return to has been set yet.

Returns

public boolean isRetainChecked (String fieldId)

public boolean isSendBulkNotification ()

public boolean isSubTaskCollection ()

public boolean isSubTaskOnly ()

public boolean isTranisitionErrorsLimited (Integer maxCount)

Returns
  • true if there is more errors on transitioned issues than maxCount.

public boolean isTransitionChecked (WorkflowTransitionKey workflowTransitionKey)

public void populateStatusHolder ()

public void populateSubTaskStatusHolder ()

public void resetMoveData ()

public void resetWorkflowTransitionSelection ()

@Deprecated public void setActions (Map<StringBulkEditAction> actions)

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

@Deprecated public void setCurrentStep (int currentStep)

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

public void setFieldScreenRenderer (FieldScreenRenderer fieldScreenRenderer)

public void setInvalidSubTaskStatusesByType (Map<StringSet<String>> invalidSubTaskStatusesByType)

public void setInvalidSubTaskTypes (Set<String> invalidSubTaskTypes)

public void setIssuesFromSearchRequest (List<Issue> issuesFromSearchRequest)

public void setIssuesInUse (Collection<?> issuesInUse)

public void setMaxIssues (int maxIssues)

Sets the maximum number of issues allowed to be bulk edited at once. Use -1 to indicate no limit.

Parameters
maxIssues either -1 or a positive integer representing the maximum number of issues allowed for bulk edit.

public void setMessagedFieldLayoutItems (Map<?, ?> messagedFieldLayoutItems)

public void setMoveFieldLayoutItems (Collection<?> moveFieldLayoutItems)

public void setOperationName (String operationName)

public void setParams (Map<String, ?> params)

public void setParentBulkEditBean (BulkEditBean parentBulkEditBean)

If this BulkEditBean contains subtasks of another BulkEditBean, then we can set a pointer back to the BulkEditBean containing the parent issues. This is used so that the subtask issues have access to the new values in their parent issues. See JRA-13937 where we had to ensure that the subtasks in a Bulk Move could get to the new Security Level of their parents.

Parameters
parentBulkEditBean The BulkEditBean that contains parent issues of the issues (subtasks); in this BulkEditBean.

@ExperimentalApi public void setParentIssueKey (String parentIssueKey)

@ExperimentalApi

This method is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Sets the destination parent issue for issue->subtask conversion.

Parameters
parentIssueKey Parent issue key

public void setRedirectUrl (String redirectUrl)

Sets the URL to which user should be redirected once the bulk operation is finished. This is used only if a progress indicator is displayed to the user while the operation is being executed.

public void setRelatedMultiBulkMoveBean (MultiBulkMoveBean relatedMultiBulkMoveBean)

public void setRemovedFields (Set<?> removedFields)

public void setRetainValues (Set<String> retainValues)

public void setSelectedWFTransitionKey (WorkflowTransitionKey workflowTransitionKey)

public void setSendBulkNotification (boolean sendBulkNotification)

public void setSubTaskBulkEditBean (BulkEditBean subTaskBulkEditBean)

@Deprecated public void setSubTaskOfSelectedIssues (List<Issue> subTaskOfSelectedIssues)

This method is deprecated.
Since 7.1. Storing this on the httpsession does not work for cloud. Storing information on the httpsession is obsoleted. Please move this functionality to the frontend or other type of storage. This method will be removed in 8.0.

public void setTargetFieldLayout ()

Sets the targetFieldLayout to the appropriate FieldLayout (aka "Field Configuration"); for the target Project and Issue Type.

public void setTargetIssueObjects (Map<IssueIssue> targetIssueObjects)

public void setTargetIssueTypeId (String id)

public void setTargetProject (GenericValue project)

This method is deprecated.
Use setTargetProject(com.atlassian.jira.project.Project) instead. Since v5.2.

public void setTargetProject (Project project)

public void setWorkflowTransitionMap (MultiMap workflowTransitionMap)