com.atlassian.jira.issue.IssueInputParameters |
Known Indirect Subclasses |
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).
@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).
This represents an issue builder and can be used to provide parameters that can be used to create and update
an issue through the IssueService
.
Any fields that are set on this object will have the values used for validation and population of the issue object created via the validate methods on the IssueService. This object is forgiving as possible so if you try to set a null value for a field no exceptions will be thrown, the value will just be ignored.
Some users might want to provide a FieldValuesHolder to the validation calls with some pre-populated data, if this is the case then you can set the field values holder on this object and the IssueService will clone the contents and pass them along to any field invocations it might make.
If you wish to indicate to the IssueService that you do not want to validate against all fields configured for
the create screen then you can set the setProvidedFields(java.util.Collection)
with the field
id's that you want to have validated. All other fields that exist on the screen will be populated with the system
default.
To construct a new IssueInputParameters object you can call newIssueInputParameters()
.
NOTE: this object is not thread-safe and is only meant to be used as a transport object.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a value for a custom field with the specified full key.
| |||||||||||
Adds a value for a custom field with the specified id.
| |||||||||||
Extra fields to consider present, even if they are not in the actionParams.
| |||||||||||
This provides the "web-style" parameters that JIRA fields expect to perform their functions.
| |||||||||||
Return form token if it is present in input parameters
| |||||||||||
Gets the original estimate set.
| |||||||||||
Gets the original estimate set.
| |||||||||||
Gets the remaining estimate set.
| |||||||||||
Gets the remaining estimate provided
If ( | |||||||||||
Get the flag to designate which fields are to be validated when the
retainExistingValuesWhenParameterNotProvided()
flag is set to true . | |||||||||||
Set a comment value with a project role restriction.
| |||||||||||
Set a comment value with no visibility restrictions.
| |||||||||||
Set a comment value with a group restriction.
| |||||||||||
If set the validation will use the seed values from this field values holder.
| |||||||||||
Allows defining history metadata related to the issue update.
| |||||||||||
Sets both the original and remaining estimate on the issue.
| |||||||||||
Sets both the original and remaining estimate on the issue.
| |||||||||||
Sets the original estimate on the issue.
| |||||||||||
Sets the original estimate on the issue.
| |||||||||||
Use this to indicate which fields validation should be performed on, if left alone then the systems configured
fields for either create/update will be used.
| |||||||||||
Sets the remaining estimate on the issue
If ( | |||||||||||
Sets the remaining estimate on the issue
If ( | |||||||||||
Flag to designate whether existing values should be retained when no parameter is provided.
| |||||||||||
Set the flag to skip screen checks during create or update.
| |||||||||||
Get the flag to skip screen checks during create or update.
|
Adds a value for a custom field with the specified full key. This will put a value in the web-style parameters with a key as provided.
fullCustomFieldKey | used in the "web-style" parameters as the key, the custom field should expect this value as the key in its populate from parameters method. |
---|---|
values | the custom field values, must be in the format the field expects. |
Adds a value for a custom field with the specified id. This will put a value in the web-style parameters with a key of the form "customfield_PROVIDED_ID". If you want to specify the key then use the method #addCustomFieldValue(String, String...).
customFieldId | the unique identifier of the custom field. |
---|---|
values | the custom field values, must be in the format the field expects. |
Extra fields to consider present, even if they are not in the actionParams. When "setRetainExisitingValuesWhenParameterNotProvided" is true, a field is not considered for update if its parameter is not provided. You can force a field to be considered even if its parameter is not providfed by forcing it to be considered by this setter.
The action post params can also contain an array of fieldIds under the "fieldsToForcePresent" param.
This may be useful if you want to clear a field's value in a single field edit.
fieldId | the id of the field to force to be present |
---|
This provides the "web-style" parameters that JIRA fields expect to perform their functions.
fullCustomFieldKey | identifies the custom field values you are looking for. |
---|
customFieldId | uniquely identifies the custom field value you are looking for. |
---|
Gets the original estimate set.
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this will return the same as getRemainingEstimate()
.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
Gets the original estimate set.
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this will return the same as getRemainingEstimateAsDurationString()
.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
Gets the remaining estimate set.
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this will return the same as getOriginalEstimate()
.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
Gets the remaining estimate provided
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this will return the same as getOriginalEstimateAsDurationString()
.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
fieldId | identifies the field in question, this will be the getId() . |
---|
fieldId | identifies the field in question, this will be the getId() . |
---|
Get the flag to designate which fields are to be validated when the retainExistingValuesWhenParameterNotProvided()
flag is set to true
.
If this flag is true
, only fields which are "present" will take part in validation (and subsequently
update) on the issue. This allows single-field edits to ignore the validation of other fields on the issue.
If this flag is false
, or if retainExistingValuesWhenParameterNotProvided()
is false
,
then all fields on the screen of the current operation will partake in the "validation-update" step.
affectedVersionIds | sets the affected version id's= on the issue. |
---|
applyDefaults | true if default value should be supplied when a parameter has not been provided. false if the default value should not be applied. |
---|
assigneeId | sets the assignee id for the issue. |
---|
Set a comment value with a project role restriction.
comment | the comment value. |
---|---|
projectRoleId | the id of the project role the comment must be restricted by. |
Set a comment value with no visibility restrictions.
comment | the comment value. |
---|
Set a comment value with a group restriction.
comment | the comment value. |
---|---|
groupId | the group name that the comment must be restricted by. |
componentIds | sets the components id's on the issue. |
---|
description | sets the description for the issue. |
---|
dueDate | the formatted string that JIRA will accept as a date that will be set on the issue. |
---|
environment | sets the environment of the issue. |
---|
If set the validation will use the seed values from this field values holder.
fieldValuesHolder | provides the seed values for the field values holder. |
---|
fixVersionIds | sets the fix version id's on the issue. |
---|
Allows defining history metadata related to the issue update. This is only relevant for changes that generate history entries (transitions and updates).
historyMetadata | the metadata to save with the history change |
---|
issueTypeId | sets the issue type for the issue. |
---|
Sets both the original and remaining estimate on the issue.
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this method has no effect.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
originalEstimate | the new original estimate, e.g. "1d 5h" for 1 day and 5 hours |
---|---|
remainingEstimate | the new remaining estimate, e.g. "1d 5h" for 1 day and 5 hours |
Sets both the original and remaining estimate on the issue.
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this method has no effect.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
originalEstimate | the new original estimate. The units used are determined by
JIRA_TIMETRACKING_DEFAULT_UNIT . |
---|---|
remainingEstimate | the new remaining estimate.The units used are determined by
JIRA_TIMETRACKING_DEFAULT_UNIT . |
Sets the original estimate on the issue.
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this method behaves differently.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
setOriginalAndRemainingEstimate(String, String)
. Calls to setOriginalEstimate(Long)
/
setOriginalEstimate(String)
and setRemainingEstimate(Long)
/ setRemainingEstimate(String)
are mutually exclusive, so calling both on the same instance will not produce the desired effect.originalEstimate | the new original estimate on the issue, e.g. "1d 5h" for 1 day and 5 hours |
---|
Sets the original estimate on the issue.
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this method behaves differently.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
setOriginalAndRemainingEstimate(String, String)
/ setOriginalAndRemainingEstimate(Long, Long)
.
Calls to setOriginalEstimate(Long)
/ setOriginalEstimate(String)
and setRemainingEstimate(Long)
/
setRemainingEstimate(String)
are mutually exclusive, so calling both on the same instance will
not produce the desired effect.
originalEstimate | the new original estimate on the issue. The units used are determined by
JIRA_TIMETRACKING_DEFAULT_UNIT . |
---|
priorityId | sets the priority for the issue. |
---|
projectId | sets the project id for the issue. |
---|
Use this to indicate which fields validation should be performed on, if left alone then the systems configured fields for either create/update will be used.
providedFields | a collection of getId() 's which identify the
fields.
|
---|
Sets the remaining estimate on the issue
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this method behaves differently.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
setOriginalEstimate(String)
, changing
the original and remaining estimate if work has not yet started.
If work has already been logged, it will alter the remaining estimate but leave the original
estimate unchanged.setOriginalAndRemainingEstimate(String, String)
/ setOriginalAndRemainingEstimate(Long, Long)
.
Calls to setOriginalEstimate(Long)
/ setOriginalEstimate(String)
and setRemainingEstimate(Long)
/
setRemainingEstimate(String)
are mutually exclusive, so calling both on the same instance will
not produce the desired effect.
remainingEstimate | the remaining estimate on the issue, e.g. "1d 5h" for 1 day and 5 hours |
---|
Sets the remaining estimate on the issue
If (JIRA_OPTION_TIMETRACKING_ESTIMATES_LEGACY_BEHAVIOUR
is set,
we are in legacy time tracking mode and this method behaves differently.
See http://confluence.atlassian.com/display/JIRA044/Configuring+Time+Tracking#ConfiguringTimeTracking-legacymode for more information on legacy mode.
setOriginalEstimate(String)
, changing
the original and remaining estimate if work has not yet started.
If work has already been logged, it will alter the remaining estimate but leave the original
estimate unchanged.setOriginalAndRemainingEstimate(String, String)
/ setOriginalAndRemainingEstimate(Long, Long)
.
Calls to setOriginalEstimate(Long)
/ setOriginalEstimate(String)
and setRemainingEstimate(Long)
/
setRemainingEstimate(String)
are mutually exclusive, so calling both on the same instance will
not produce the desired effect.
remainingEstimate | the remaining estimate on the issue. The units used are determined by
JIRA_TIMETRACKING_DEFAULT_UNIT . |
---|
reporterId | sets the reporter id for the issue. |
---|
resolutionDate | the formatted string that JIRA will accept as a date that will be set on the issue. |
---|
resolutionId | sets the resolution for the issue. |
---|
Flag to designate whether existing values should be retained when no parameter is provided.
Note: setting this flag here will assume that validation of fields should still occur, even if they were not specified.
To change this, please use setRetainExistingValuesWhenParameterNotProvided(boolean, boolean)
instead.
retain | true if non-provided parameters should have the values retained, false otherwise. |
---|
Set flags retainExistingValuesWhenParameterNotProvided()
and onlyValidatePresentFieldsWhenRetainingExistingValues()
.
The latter is only relevant when the former is true.
retainExistingValues | true if non-provided parameters should have the values retained, false otherwise. |
---|---|
onlyValidatePresentFields | whether or not to only validate present fields |
onlyValidatePresentFieldsWhenRetainingExistingValues()
securityLevelId | sets the security level id on the issue. |
---|
Set the flag to skip screen checks during create or update.
By default, the Issue Service only allows setting values to fields which appear on the screen of the operation which you are performing (e.g. the Edit screen). By enabling this flag, the Issue Service will skip this check.
skipScreenCheck | whether or not we are skipping screen check |
---|
statusId | sets the status of the issue. |
---|
summary | sets the summary for the issue. |
---|
timeSpent | sets the time spent on the issue. |
---|
Get the flag to skip screen checks during create or update.
By default, the Issue Service only allows setting values to fields which appear on the screen of the operation which you are performing (e.g. the Edit screen). By enabling this flag, the Issue Service will skip this check.