Class MoveIssueUpdateFields
java.lang.Object
webwork.action.ActionSupport
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
- All Implemented Interfaces:
OperationContext,ErrorCollection,I18nHelper,Assignable,IssueSummaryAware,HttpServletVariables,AuthorizationSupport,Serializable,webwork.action.Action,webwork.action.CommandDriven,webwork.action.IllegalArgumentAware
- Direct Known Subclasses:
MoveIssueConfirm
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
JiraWebActionSupport.MessageTypeNested classes/interfaces inherited from interface com.atlassian.jira.util.ErrorCollection
ErrorCollection.ReasonNested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper
I18nHelper.BeanFactory -
Field Summary
Fields inherited from class com.atlassian.jira.web.action.issue.MoveIssue
constantsManager, fieldLayoutManager, fieldManager, issueFactory, SUBTASK_STATUS_PREFIX, workflowManagerFields inherited from class com.atlassian.jira.web.action.issue.AbstractCommentableIssue
userUtilFields inherited from class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
id, ISSUE_PERMISSION_ERROR, PREPOPULATED_ISSUE_OBJECTFields inherited from class com.atlassian.jira.web.action.IssueActionSupport
attachmentManagerFields inherited from class com.atlassian.jira.web.action.ProjectActionSupport
projectManagerFields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, log, PERMISSION_VIOLATION_RESULT, request, RETURN_URL_PARAMETER, savedFilters, SECURITY_BREACH_RESULTFields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessagesFields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
ConstructorsConstructorDescriptionMoveIssueUpdateFields(SubTaskManager subTaskManager, ConstantsManager constantsManager, WorkflowManager workflowManager, FieldManager fieldManager, FieldLayoutManager fieldLayoutManager, IssueFactory issueFactory, FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService, IssueSecurityHelper issueSecurityHelper, UserUtil userUtil, UserManager userManager, HelpUrls helpUrls) -
Method Summary
Modifier and TypeMethodDescriptionHandles the initial request to move an issue.protected StringHandles 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.protected voidprotected Collection<CustomField> getCurrentCustomFieldObjects(String issueTypeId) Retrieve a collection of custom field objects associated with the specified issue type.getFieldHtml(FieldLayoutItem fieldLayoutItem) getFieldName(Field field) protected Collection<CustomField> getTargetCustomFieldObjects(String targetIssueTypeId) Returns a collection of target custom field objects.Retrieve the custom fields that are applicable in the target destination.protected FieldLayoutprotected Collectionprotected MutableIssueRetrieves the issue from the IssueManager and updates the Project and IssueType, and possibly clears the security.protected MutableIssueRetrieves the issue from the IssueManager and updates the Project and IssueType.protected booleanisShouldCheckFieldValue(Issue origIssue, Field field) JRA-12671 - need to determine if we should call hasValue on the field.booleanprotected voidpopluateDefault(OrderableField orderableField) protected voidpopulateFromParams(OrderableField orderableField) Methods inherited from class com.atlassian.jira.web.action.issue.MoveIssue
getAllowedProjects, getBeanTargetStatusId, getConstantsManager, getCurrentIssueType, getCurrentStatus, getCurrentStatusObject, getCurrentWorkflow, getFieldHtml, getFieldLayoutManager, getFieldManager, getIssueObject, getMoveIssueBean, getPrefixIssueTypeId, getPrefixTaskStatusId, getSubTasks, getSubtaskTargetIssueType, getSubTaskTargetStatus, getSubTaskTypesUsed, getTargetIssueType, getTargetIssueTypeObject, getTargetPid, getTargetProjectObj, getTargetStatusId, getTargetWorkflow, getTargetWorkflowStatuses, getTaskInvalidStatuses, getTaskInvalidStatusObjects, getTasksWithStatus, getViewHtmlParams, getWorkflowForType, getWorkflowManager, isHasSubTasks, isIssueStatusValid, isStatusChangeRequired, isSubTask, isTaskStatusChangeRequired, isTaskStatusValid, isWorkflowMatch, redirectToSessionTimeoutPage, setBeanTargetStatusId, validateAttachmentMove, validateCreateIssueMethods inherited from class com.atlassian.jira.web.action.issue.AbstractCommentableAssignableIssue
assigneeChanged, getAssignee, getAssignIn, hasAssigneePermission, setAssigneeMethods inherited from class com.atlassian.jira.web.action.issue.AbstractCommentableIssue
createComment, doCommentValidation, getComment, getCommentLevel, getDisplayParams, getFieldScreenRendererLayoutItemForField, getFieldScreenRendererWithAllFields, getFieldValuesHolder, getGroupLevel, getGroupLevels, getIssueOperation, getOrderableField, getRoleLevels, populateAttachmentsFieldValuesHolderAndValidate, populateCommentFields, processAttachments, processAttachments, requireAttachmentsResources, setComment, setCommentLevel, setFieldValuesHolder, setGroupLevelMethods inherited from class com.atlassian.jira.web.action.issue.AbstractViewIssue
getAttachments, getPossibleComponents, getPossibleVersions, getPossibleVersionsReleasedFirstMethods inherited from class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
addErrorMessage, assertIssueIsValid, cameFromIssue, cameFromParent, getId, getIssue, getIssueObject, getIssueObjectWithoutDatabaseRead, getIssuePath, getKey, getLayoutBean, getMutableIssue, getParentIssueObject, getProject, getProjectObject, getSecurityLevel, getSubTaskManager, getSummaryIssue, getViewIssueKey, getViewUrl, isEditable, isEditable, isHasEditIssuePermission, isIssueExists, isIssueValid, isSubTaskCreatable, isWorkflowAllowsEdit, redirectToView, refreshIssueObject, setId, setIssueObject, setKey, setViewIssueKeyMethods inherited from class com.atlassian.jira.web.action.IssueActionSupport
addIssueToHistory, getAttachmentManager, getCurrentDateTimeInUsersTimezone, getCurrentFailedLoginCount, getCurrentJQL, getCustomFieldManager, getDaysPerWeek, getEverLoggedIn, getFormToken, getHoursPerDay, getIssueManager, getLastFailedLogin, getLastLogin, getLoginCount, getPossibleVersions, getPossibleVersionsReleasedFirst, getPrettyDuration, getPreviousLogin, getSearchRequest, getSelectedIssueId, getSessionPagerFilterManager, getSessionSearchRequestManager, getSessionSearchRequestManagerFactory, getSessionSelectedIssueManager, getTotalFailedLoginCount, getUrlEncoded, getWorkflow, getWorkflowTransitionDescription, getWorkflowTransitionDisplayName, isCustomFieldHidden, isElevatedSecurityCheckRequired, isFieldHidden, isFieldHidden, isTimeTrackingEnabled, setFormToken, setSearchRequest, setSelectedIssueId, updateSearchRequestMethods inherited from class com.atlassian.jira.web.action.ProjectActionSupport
getBrowsableProjects, getSelectedProjectId, setSelectedProject, setSelectedProjectMethods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addError, addErrorCollection, addErrorMessage, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, addMessageToResponse, addReason, addReasons, checkIfUrlIsAllowed, execute, forceRedirect, getActionName, getActionNameJspa, getAdministratorContactLink, getApplicationProperties, getAuthorizationSupport, getComponentInstanceOfType, getConglomerateCookieValue, getDateFormat, getDateTimeFormat, getDateTimeFormatter, getDefaultResourceBundle, getDescTranslation, getDescTranslation, getDmyDateFormatter, getEmptyResponse, getErrorMessages, getErrors, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getHttpRequest, getHttpResponse, getHttpSession, getI18nHelper, getJiraContactHelper, getJiraServiceContext, getKeysForPrefix, getLanguage, getLocale, getLoggedInApplicationUser, getLoggedInUser, getNameTranslation, getNameTranslation, getOfBizDelegator, getOutboundWhitelistProvider, getOutlookDate, getPermissionManager, getProjectManager, getRandomHint, getReasons, getRedirect, getRedirect, getRedirectSanitiser, getRequestSourceType, getResourceBundle, getResult, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getServletContext, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTimeFormat, getUnescapedText, getUntransformedRawText, getUriValidator, getUserFullName, getUserManager, getUserPreferences, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasAnyErrors, hasErrorMessage, hasErrorMessageByKey, hasGlobalPermission, hasGlobalPermission, hasIssuePermission, hasIssuePermission, hasIssuePermission, hasPermission, hasProjectPermission, hasProjectPermission, htmlEncode, insertContextPath, isAdministrator, isIndexing, isInlineDialogMode, isKeyDefined, isSystemAdministrator, isUserExists, isUserExistsByKey, isUserExistsByName, removeKeyOrAddError, returnComplete, returnComplete, returnCompleteWithInlineRedirect, returnCompleteWithInlineRedirectAndMsg, returnCompleteWithInlineRedirectAndMsg, returnMsgToUser, returnMsgToUser, setConglomerateCookieValue, setInline, setReasons, setReturnUrl, setSelectedProjectId, tagMauEventWithApplication, tagMauEventWithProject, urlEncodeMethods inherited from class webwork.action.ActionSupport
addError, getCommandName, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface webwork.action.CommandDriven
getCommandName, setCommandMethods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, setErrorMessagesMethods inherited from interface com.atlassian.jira.web.action.issue.IssueSummaryAware
getLoggedInApplicationUserMethods inherited from interface com.atlassian.jira.issue.customfields.OperationContext
getFieldValuesHolder, getIssueOperation
-
Constructor Details
-
MoveIssueUpdateFields
public MoveIssueUpdateFields(SubTaskManager subTaskManager, ConstantsManager constantsManager, WorkflowManager workflowManager, FieldManager fieldManager, FieldLayoutManager fieldLayoutManager, IssueFactory issueFactory, FieldScreenRendererFactory fieldScreenRendererFactory, CommentService commentService, IssueSecurityHelper issueSecurityHelper, UserUtil userUtil, UserManager userManager, HelpUrls helpUrls)
-
-
Method Details
-
doDefault
Description copied from class:MoveIssueHandles 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:
doDefaultin classMoveIssue- Returns:
- "securitybreach" if the user is not authorised to move the issue;
Action.ERRORif 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.
-
getMoveFieldLayoutItems
-
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.
- See Also:
-
getTargetIssueObjectWithSecurityLevel
Retrieves the issue from the IssueManager and updates the Project and IssueType. The security level setting is left in place - seegetTargetIssueObject()for an alternative method.- Returns:
- Issue Object with required Project and Issue Type added in.
- See Also:
-
getTargetFieldLayout
-
getFieldHtml
-
getFieldName
-
doValidation
protected void doValidation()- Overrides:
doValidationin classMoveIssue
-
popluateDefault
-
populateFromParams
-
doExecute
Description copied from class:MoveIssueHandles 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 toMoveIssueSubtasks.doDefault()so that the tasks issue types can be mapped; otherwise, it redirects toMoveIssueUpdateWorkflow.doDefault()- Overrides:
doExecutein classMoveIssue- 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 toMoveIssueUpdateWorkflow.doDefault() - Throws:
Exception
-
isShouldCheckFieldValue
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 contextfield- The field in question.- Returns:
- true, if the field is not a custom value, or it is in scope in the original issue.
-
getTargetHiddenFields
-
getCustomFieldValuesHolder
-
getCurrentCustomFieldObjects
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.
-
getTargetCustomFieldObjects
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.
-
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.
-
getCustomFieldContextHelpUrl
-
isUserAdmin
public boolean isUserAdmin()
-