java.lang.Object | |||
↳ | com.atlassian.jira.issue.fields.AbstractField | ||
↳ | com.atlassian.jira.issue.fields.AbstractOrderableField | ||
↳ | com.atlassian.jira.issue.fields.WorklogSystemField |
A field representation of logging work.
This allows JIRA administrators to place the "Log Work" field on screens. This means that JIRA users can now log
work whilst creating, editing or transitioning issues. The field works in a similar way to the
CommentSystemField
in that while it implements the "getEditHtml" method, previously entered work logs cannot
be edited. In effect, the only functionality available is to "add" more work logs.
The WorklogService
is used to do the hard work of validating and creating the work logs from user input.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WorklogSystemField.WorklogValue | A value object used to aggregate all the transient values required in taking input from the UI, validating it and creating the resultant work logs. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.jira.issue.fields.OrderableField
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.atlassian.jira.issue.fields.AbstractField
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Determines whether the field is available for bulk editing given the BulkEditBean.
| |||||||||||
Returns
true if a call to removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value. | |||||||||||
Return
SearchHandler for the field. | |||||||||||
Create the value of the issue in the data store.
| |||||||||||
Returns the HTML that should be shown when the issue is being created.
| |||||||||||
The value that should be set on the issue if the field is not shown for some reason.
| |||||||||||
Returns HTML that should be shown when the issue is being edited.
| |||||||||||
Returns lower level Information about the field.
| |||||||||||
Return The default data for this system field.
| |||||||||||
Return a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation
of the rendered data for easy display.
| |||||||||||
Return a description of the shape of this field when represented as JSON.
| |||||||||||
Gets the value stored for this field on the provided issue.
| |||||||||||
Get a field value from the map of parameters passed.
| |||||||||||
Determines if the field has a value for the given issue.
| |||||||||||
Defines if a field determines itself as renderable.
| |||||||||||
Tests field specific way to determine if it should be shown or not.
| |||||||||||
Used to determine if the field needs input from user to be moved to the new project and/or issue type.
| |||||||||||
Populate the fieldValueHolder with a value that should be shown by default when the issue
has not been created yet.
| |||||||||||
Used to populate the fieldValueHolder with parameters for move issue screen.
| |||||||||||
Used to initialise the fieldValuesHolder from the current value of teh issue.
| |||||||||||
Used to convert from a user friendly string value and put the result into the fieldValuesHolder.
| |||||||||||
Removes the field value from the given MutableIssue object.
| |||||||||||
Explicitly set current session
| |||||||||||
Sets the value as a modified external field in the issue so that this
field will be updated along with all the other modified issue values.
| |||||||||||
Update the issue in the data store.
| |||||||||||
Ensure that the parameters are valid
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Defines the object that will be passed through to the create method
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.atlassian.jira.issue.fields.AbstractOrderableField
| |||||||||||
From class
com.atlassian.jira.issue.fields.AbstractField
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.issue.fields.Field
| |||||||||||
From interface
com.atlassian.jira.issue.fields.OrderableField
| |||||||||||
From interface
com.atlassian.jira.issue.fields.SearchableField
| |||||||||||
From interface
com.atlassian.jira.issue.fields.renderer.RenderableField
| |||||||||||
From interface
com.atlassian.jira.issue.fields.rest.AuthAwareField
| |||||||||||
From interface
com.atlassian.jira.issue.fields.rest.RestAwareField
| |||||||||||
From interface
com.atlassian.jira.issue.fields.rest.RestFieldOperations
| |||||||||||
From interface
java.lang.Comparable
|
Determines whether the field is available for bulk editing given the BulkEditBean.
bulkEditBean | holds the state of the bulk-edit wizard (e.g. the selected issues for bulk editing) |
---|
null
if the field is available for bulk-editing or an i18n key of the error message to show as
why the field is not available.
Returns true
if a call to removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value.
There a few different reasons why this method may return false:
issue | The Issue object. |
---|
true
if a call to removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value.Return SearchHandler
for the field. This object tells JIRA how to search for values within the field.
null
when no searcher
is associated with the field. This will mainly happen when a customfield is configured to have no
searcher.
Create the value of the issue in the data store.
issue | Issue this field is part of |
---|---|
newValue | Value to store in this field (eg. Collection for Version fields). Cannot be null. |
Returns the HTML that should be shown when the issue is being created.
fieldLayoutItem | FieldLayoutItem |
---|---|
operationContext | OperationContext |
action | Action |
issue | Issue |
displayParameters | Map of display parameters. |
The value that should be set on the issue if the field is not shown for some reason.
For example: The user does not have permission to see the field, or the field is not part of the create screen.
issue | the Issue. |
---|
Returns HTML that should be shown when the issue is being edited.
fieldLayoutItem | FieldLayoutItem |
---|---|
operationContext | OperationContext |
action | Action |
issue | Issue |
displayParameters | Map of display parameters. |
Returns lower level Information about the field. This information contains allowed values and/or the autocomplete url
fieldTypeInfoContext | the FieldTypeInfoContext contains context information that is relevant to generate the FieldTypeInfo
|
---|
Return The default data for this system field. May be null if there is no default.
issueCtx | Issue (This should really only need to be an issue context, but for historical reasons we need an issue object. |
---|
Return a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.
issue | to get field data from |
---|---|
renderedVersionRequested | whether the use requested the return of rendered/pretty data as well as raw data |
fieldLayoutItem | field layout for this field. Will only be supplied if the field is also an ordereable field. |
Return a description of the shape of this field when represented as JSON.
Gets the value stored for this field on the provided issue.
issue | identifies the issue that will contain the value for this field. |
---|
Get a field value from the map of parameters passed. The params map may contain other parameters that are not relevant to this custom field.
params | the map of parameters. |
---|
FieldValidationException |
---|
Determines if the field has a value for the given issue.
issue | the Issue. |
---|
Defines if a field determines itself as renderable. This is needed because of the way that customfields are implemented. Since all the real work is done in CustomFieldTypes, if we want to treat system fields and custom fields the same way in the renderers then all custom fields must implement this interface. We therefore provide this method so that the CustomFieldImpl can delegate to the CustomFieldTypes to determine if a given custom field is renderable.
Tests field specific way to determine if it should be shown or not.
issue | The Issue. |
---|
Used to determine if the field needs input from user to be moved to the new project and/or issue type. This method is called only if the field is visible in the target project/issue type.
originalIssues | Collection of original Issues. |
---|---|
targetIssue | Target Issue. |
targetFieldLayoutItem | FieldLayoutItem |
Populate the fieldValueHolder with a value that should be shown by default when the issue has not been created yet.
fieldValuesHolder | The fieldValuesHolder Map to be populated. |
---|---|
issue | The Issue. |
Used to populate the fieldValueHolder with parameters for move issue screen.
This field is only called if the issue needs to be updated during move, i.e. needsMove(java.util.Collection, com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem)
returned true, and the remote user (the one performing the move) has the permission to actually update this field.
fieldValuesHolder | Map of field Values. |
---|---|
originalIssue | orignal Issue |
targetIssue | target Issue |
Used to initialise the fieldValuesHolder from the current value of teh issue. Used, for example, when showing the Edit Issue screen to show the issue's current values.
fieldValuesHolder | The fieldValuesHolder Map to be populated. |
---|---|
issue | The Issue. |
Used to convert from a user friendly string value and put the result into the fieldValuesHolder. This method is useful for places like Jelly where the field value can be a name (e.g. issue type name) and not a regular id that is used in the web pages.
fieldValuesHolder | Map of field Values. |
---|---|
stringValue | user friendly string value |
issue | the Issue |
FieldValidationException |
---|
Removes the field value from the given MutableIssue object.
Note that this operation does not actually persist the change, it just clears the value from the given Issue object. The caller will still need to call #updateValue() in order to persist the change.
Some Fields may choose to quietly ignore this request. eg The SecurityLevel Field will not remove Security Level from subtasks because the subtask must always take the Security Level of its parent issue.
issue | The issue object to be effected. |
---|
Sets the value as a modified external field in the issue so that this field will be updated along with all the other modified issue values.
fieldLayoutItem | FieldLayoutItem |
---|---|
issue | MutableIssue |
fieldValueHolder | Field Value Holder Map |
Update the issue in the data store.
Fields that are simply stored in the JIRAISSUE DB table, need not do anything here as this table is written to one time to include all fields that changed. Fields using other DB tables must update that table with the appropriate values.
fieldLayoutItem | for this field within this context |
---|---|
issue | Issue this field is part of |
modifiedValue | new value to set field to. Cannot be null. |
issueChangeHolder | an object to record any changes made to the issue by this method. |
Ensure that the parameters are valid
operationContext | OperationContext |
---|---|
errorCollectionToAddTo | ErrorCollection to add to. |
i18n | I18nHelper |
issue | This is passed to get the value of other fields that may or may not have been modified. |
fieldScreenRenderLayoutItem | FieldScreenRenderLayoutItem |
Defines the object that will be passed through to the create method
inputParameters | is a representation of the request params that are available |
---|
WorklogSystemField.WorklogValue