Class FieldHtmlFactoryImpl
java.lang.Object
com.atlassian.jira.issue.fields.rest.FieldHtmlFactoryImpl
- All Implemented Interfaces:
FieldHtmlFactory
Note: There's no unit tests in JIRA source but this is already tested quite heavily via func tests in the quick-edit
plugin as well as webdriver tests for quick edit in JIRA source.
- Since:
- 5.0.3
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFieldHtmlFactoryImpl
(I18nHelper.BeanFactory beanFactory, FieldManager fieldManager, FieldScreenRendererFactory fieldScreenRendererFactory, PermissionManager permissionManager, FeatureManager featureManager, CustomFieldManager customFieldManager) -
Method Summary
Modifier and TypeMethodDescriptiongetCreateFields
(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, MutableIssue newIssueObject, boolean retainValues, List<String> fieldsToRetain) Returns a list of fields on the create screen as specified by the newIssueObject skeleton (it contains the project and issue type context) including the project and issue type fields.getEditFields
(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, Issue issue, boolean retainValues) Returns all the edit fields required for the specified issue object.getInlineEditFields
(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, Issue issue, boolean retainValues) Returns all edit fields applicable for inline editing.getLinkedIssueCreateFields
(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, MutableIssue newIssueObject, Issue sourceIssue, boolean retainValues, List<String> fieldsToRetain) Returns a list of fields on the create screen as specified by the newIssueObject skeleton (it contains the project and issue type context) including the project, issue type and issue links fields.getSubTaskCreateFields
(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, MutableIssue newIssueObject, boolean retainValues, List<String> fieldsToRetain) This essentially returns the same as the#getCreateFields(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.issue.customfields.OperationContext, webwork.action.Action, com.atlassian.jira.issue.MutableIssue, boolean, java.util.List)
method but it strips out certain fields such as the project selector.
-
Field Details
-
JIRA_CREATE_LINKED_ISSUE_SHOW_ALL_FIELDS
- See Also:
-
-
Constructor Details
-
FieldHtmlFactoryImpl
public FieldHtmlFactoryImpl(I18nHelper.BeanFactory beanFactory, FieldManager fieldManager, FieldScreenRendererFactory fieldScreenRendererFactory, PermissionManager permissionManager, FeatureManager featureManager, CustomFieldManager customFieldManager)
-
-
Method Details
-
getCreateFields
public List<FieldHtmlBean> getCreateFields(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, MutableIssue newIssueObject, boolean retainValues, List<String> fieldsToRetain) Description copied from interface:FieldHtmlFactory
Returns a list of fields on the create screen as specified by the newIssueObject skeleton (it contains the project and issue type context) including the project and issue type fields.- Specified by:
getCreateFields
in interfaceFieldHtmlFactory
- Parameters:
user
- the remote useroperationContext
- holding context information about the actionaction
- the webwork action performing this operationnewIssueObject
- skeleton issue objectretainValues
- If we should keep all the field values when switching from full back to quick editfieldsToRetain
- List of fields to retain when creating multiple issues in a row- Returns:
- A list of
FieldHtmlBean
s
-
getEditFields
public List<FieldHtmlBean> getEditFields(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, Issue issue, boolean retainValues) Description copied from interface:FieldHtmlFactory
Returns all the edit fields required for the specified issue object. This also includes a comment field if the user has permission to add comments.- Specified by:
getEditFields
in interfaceFieldHtmlFactory
- Parameters:
user
- the remote useroperationContext
- holding context information about the actionaction
- the webwork action performing this operationissue
- the issue being edited. Used to populate the field values.retainValues
- If we should keep all the field values when switching from full back to quick edit- Returns:
- A list of
FieldHtmlBean
s
-
getInlineEditFields
public List<FieldHtmlBean> getInlineEditFields(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, Issue issue, boolean retainValues) Description copied from interface:FieldHtmlFactory
Returns all edit fields applicable for inline editing. That is edit fields and non-empty custom fields. This also includes a comment field if the user has permission to add comments.- Specified by:
getInlineEditFields
in interfaceFieldHtmlFactory
- Parameters:
user
- the remote useroperationContext
- holding context information about the actionaction
- the webwork action performing this operationissue
- the issue being edited. Used to populate the field values.retainValues
- If we should keep all the field values when switching from full back to quick edit- Returns:
- A list of
FieldHtmlBean
s
-
getSubTaskCreateFields
public List<FieldHtmlBean> getSubTaskCreateFields(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, MutableIssue newIssueObject, boolean retainValues, List<String> fieldsToRetain) Description copied from interface:FieldHtmlFactory
This essentially returns the same as the#getCreateFields(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.issue.customfields.OperationContext, webwork.action.Action, com.atlassian.jira.issue.MutableIssue, boolean, java.util.List)
method but it strips out certain fields such as the project selector.- Specified by:
getSubTaskCreateFields
in interfaceFieldHtmlFactory
- Parameters:
user
- the remote useroperationContext
- holding context information about the actionaction
- the webwork action performing this operationnewIssueObject
- skeleton issue objectretainValues
- If we should keep all the field values when switching from full back to quick editfieldsToRetain
- List of fields to retain when creating multiple issues in a row- Returns:
- A list of
FieldHtmlBean
s
-
getLinkedIssueCreateFields
public List<FieldHtmlBean> getLinkedIssueCreateFields(ApplicationUser user, OperationContext operationContext, webwork.action.Action action, MutableIssue newIssueObject, Issue sourceIssue, boolean retainValues, List<String> fieldsToRetain) Description copied from interface:FieldHtmlFactory
Returns a list of fields on the create screen as specified by the newIssueObject skeleton (it contains the project and issue type context) including the project, issue type and issue links fields. This also includes Summary and Description fields even if they are not configured on create screen. Those fields will be prefilled by the corresponding values pulled from the source issue The issue links field will be prefilled by a link to the source issue- Specified by:
getLinkedIssueCreateFields
in interfaceFieldHtmlFactory
- Parameters:
user
- the remote useroperationContext
- holding context information about the actionaction
- the webwork action performing this operationnewIssueObject
- skeleton issue objectsourceIssue
- the issue to get field values to prefill the returned fieldsretainValues
- If we should keep all the field values when switching from full back to quick editfieldsToRetain
- List of fields to retain when creating multiple issues in a row- Returns:
- A list of
FieldHtmlBean
s
-