com.atlassian.jira.project.version.VersionManager |
![]() |
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).
Manager responsible for JIRA versions.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ALL_RELEASED_VERSIONS | Used to retrieve all released versions | |||||||||
String | ALL_UNRELEASED_VERSIONS | Used to retrieve all unreleased versions | |||||||||
String | NO_VERSIONS | Used to represent empty version fields |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Archive/Un-archive a single version depending on the archive flag.
| |||||||||||
Method used to archive and un-archive a number of versions.
| |||||||||||
This method is deprecated.
Since JIRA version 7.0.1, this is deprecated on favour of
createVersion(String, java.util.Date, java.util.Date, String, Long, Long, boolean)
which lets you specify the startDate and release attribute values
for the new Version object.
| |||||||||||
Creates a new
Version . | |||||||||||
This method is deprecated.
Since JIRA version 7.0.1, this is deprecated on favour of
createVersion(String, java.util.Date, java.util.Date, String, Long, Long, boolean)
which lets you specify the release attribute value for the new
Version object.
| |||||||||||
Move a version to have a higher sequence number - ie make it later
| |||||||||||
Deletes all versions in given project.
| |||||||||||
This method deletes a version and additionally (unlinke
deleteVersion(Version) ) removes it from all issues that reference it. | |||||||||||
Removes a specific version from the system.
| |||||||||||
Removes a specific version from the system.
| |||||||||||
Updates details of an existing version.
| |||||||||||
Update the release date of a version.
| |||||||||||
Updates the start date of a version
| |||||||||||
Updates the start and release date of a version
| |||||||||||
Get all affected versions of the specified issue.
| |||||||||||
Returns all versions that belong to the passed projects.
| |||||||||||
Get all fix for versions of the specified issue.
| |||||||||||
Return all the issues in which the affects version matches the specified version.
| |||||||||||
Return all the issues in which the fix version matches the specified version.
| |||||||||||
Return all the issues in which the affected version matches the specified version.
| |||||||||||
Return all the issues in which the fix for version matches the specified version.
| |||||||||||
Return all unarchived versions except this one
| |||||||||||
Return all other versions in the project except this one
| |||||||||||
Search for a version by projectID and name.
| |||||||||||
Returns a single version.
| |||||||||||
Return a list of Versions for the given project.
| |||||||||||
Return a list of Versions for the given project.
| |||||||||||
Return a list of Versions for the given project.
| |||||||||||
Return a collection of
Version s matching the ids passed in. | |||||||||||
Return all archived versions for a particular project.
| |||||||||||
Return a collection of
Version s that have the specified name. | |||||||||||
Gets a list of released versions for a project.
| |||||||||||
Gets a list of released versions for a project in reverse order.
| |||||||||||
Return all un-archived versions for a particular project
| |||||||||||
Gets a list of un-released versions for a particular project.
| |||||||||||
Move a version to have a lower sequence number - ie make it earlier
| |||||||||||
Check that the version name we are changing to is not a duplicate.
| |||||||||||
Checks to see if a version is overdue.
| |||||||||||
This method will perform a version merge.
| |||||||||||
Swaps the list of issues supplied from one Fix version to another.
| |||||||||||
Move a version to the end of the version sequence
| |||||||||||
Move a version to the start of the version list
| |||||||||||
Move a version after another version
| |||||||||||
Used to release or unrelease a version, depending on the release flag.
| |||||||||||
Used to release versions depending on the release flag.
| |||||||||||
This method will update all issues that currently have
version set as either affects or fix version to
the new affectsSwapVersion or fixSwapVersion
Both | |||||||||||
Persists updates to the specified version object.
| |||||||||||
Used to retrieve all released versions
Used to retrieve all unreleased versions
Archive/Un-archive a single version depending on the archive flag.
version | the Version to archive or unarchive |
---|---|
archive | new archive value |
Method used to archive and un-archive a number of versions.
idsToArchive | Archive all these Versions |
---|---|
idsToUnarchive | Unarchive these Versions |
This method is deprecated.
Since JIRA version 7.0.1, this is deprecated on favour of
createVersion(String, java.util.Date, java.util.Date, String, Long, Long, boolean)
which lets you specify the startDate
and release
attribute values
for the new Version
object.
Creates a new Version
object.
name | the Name |
---|---|
releaseDate | date of release or null if not released. |
description | the Description |
projectId | the id of the Project of the version. |
scheduleAfterVersion | id of the version after which this should be sequenced or null. |
CreateException | If there was a problem creating the version. |
---|
Creates a new Version
.
This method differs from createVersion(String, java.util.Date, java.util.Date, String, Long, Long)
in
that it lets you specify the value for the attribute release
.
name | Name of the version |
---|---|
startDate | Start date of the version |
releaseDate | Release date for the version |
description | Version description |
projectId | The numeric id of the project this version belongs |
scheduleAfterVersion | Numeric id of the version to schedule after the given version object |
released | Sets the release attribute value for the version object to create |
CreateException |
---|
This method is deprecated.
Since JIRA version 7.0.1, this is deprecated on favour of
createVersion(String, java.util.Date, java.util.Date, String, Long, Long, boolean)
which lets you specify the release
attribute value for the new
Version
object.
Creates a new Version
object.
name | the Name |
---|---|
startDate | start date of the version or null |
releaseDate | date of release or null if not released. |
description | the Description |
projectId | the id of the Project of the version. |
scheduleAfterVersion | id of the version after which this should be sequenced or null. |
CreateException | If there was a problem creating the version. |
---|
Move a version to have a higher sequence number - ie make it later
version | the Version |
---|
Deletes all versions in given project. Note that this method will not fire a VersionDeleteEvent upon deletion of a version.
projectId | the id of project in which versions will be deleted. |
---|
This method deletes a version and additionally (unlinke deleteVersion(Version)
) removes it from all issues that reference it.
user | User that will perform the update of issues. |
---|---|
versionToRemove | Version to be deleted. |
Removes a specific version from the system. versionToDelete
is the version which is going to be removed.
If affectsSwapVersion
is defined, then issues with versionToDelete
as a value of Affects Version/s
system field will use affectsSwapVersion
instead.
Similarly, fixSwapVersion
will replace versionToDelete
as a value in Fix Version/s system field.
applicationUser | the user that will be used to update related issues |
---|---|
versionToDelete | the version to be deleted |
affectsSwapVersion | the version which replaces the version to be deleted as Affected Version/s. |
fixSwapVersion | the version which replaces the version to be deleted as Fix Version/s. |
Removes a specific version from the system.
version | The version to be removed. |
---|
Updates details of an existing version.
version | The version to update |
---|---|
name | The new version name, cannot be empty. |
description | The description of this version. |
IllegalArgumentException | If the name is not set, or already exists. |
---|
Update the release date of a version.
version | the Version to edit |
---|---|
duedate | new release date |
Updates the start date of a version
version | the version to edit |
---|---|
startDate | new start date |
Updates the start and release date of a version
version | the version to edit |
---|---|
startDate | new start date |
releaseDate | new release date |
Get all affected versions of the specified issue.
issue | the issue |
---|
Returns all versions that belong to the passed projects.
projects | projects to search in |
---|---|
includeArchived | whether or not to include archived versions |
includeArchived | whether or not to include archived versions |
---|
includeArchived | whether or not to include archived versions |
---|
Get all fix for versions of the specified issue.
issue | the Issue |
---|
Return all the issues in which the affects version matches the specified version.
version | the affects version. |
---|
Return all the issues in which the fix version matches the specified version.
version | the fix version. |
---|
Return all the issues in which the affected version matches the specified version.
version | the affected version. |
---|
Return all the issues in which the fix for version matches the specified version.
version | the fixed for version. |
---|
Return all unarchived versions except this one
version | the Version |
---|
Return all other versions in the project except this one
version | the Version |
---|
Search for a version by projectID and name.
projectId | the Project |
---|---|
versionName | the Version name |
Version
object.
Return a list of Versions for the given project.
project | the Project |
---|
Return a list of Versions for the given project.
projectId | the Project |
---|
Return a list of Versions for the given project.
projectId | the Project |
---|---|
includeArchived | whether or not to include archived versions |
Return all archived versions for a particular project.
project | the Project |
---|
Return a collection of Version
s that have the specified name.
versionName | the name of the version (case-insensitive) |
---|
Gets a list of released versions for a project. This list will include archived versions if the 'includeArchived' flag is set to true.
projectId | project id |
---|---|
includeArchived | flag to indicate whether to include archived versions in the result. |
Version
objects
Gets a list of released versions for a project in reverse order. This list will include archived versions if the 'includeArchived' flag is set to true.
projectId | project id |
---|---|
includeArchived | flag to indicate whether to include archived versions in the result. |
Version
objects
Return all un-archived versions for a particular project
projectId | id of the project. |
---|
Version
sGets a list of un-released versions for a particular project.
projectId | The id of the project for which to return versions |
---|---|
includeArchived | True if archived versions should be included |
Version
s, never nullMove a version to have a lower sequence number - ie make it earlier
version | the Version |
---|
Check that the version name we are changing to is not a duplicate.
version | The version to update |
---|---|
name | The new name for the version |
Checks to see if a version is overdue. Note: This method checks if the due date set for a version is previous to last midnight. (not now()).
version | the Version |
---|
This method will perform a version merge. versionToDelete
is a version that will be deleted completely.
All issues will have this version replaced with versionToMergeTo
.
user | The user that will be used to update related issues |
---|---|
versionToDelete | Version that will be deleted |
versionToMergeTo | All issues will have deleted version replaced with this one |
Swaps the list of issues supplied from one Fix version to another.
issues | the Issues |
---|---|
currentVersion | Current fix version they will be swapped from |
swapToVersion | New fix version they will be swapped to. |
IndexException | if an error occurs will indexing these new issue values. |
---|
Move a version to the end of the version sequence
version | the Version |
---|
Move a version to the start of the version list
version | the Version to move |
---|
Move a version after another version
version | version to reschedule |
---|---|
scheduleAfterVersion | id of the version to schedule after the given version object |
Used to release or unrelease a version, depending on the release flag.
version | Version to be released (or unreleased) |
---|---|
release | True to release a version. False to 'unrelease' a version |
Used to release versions depending on the release flag.
versions | Collection of Version s |
---|---|
release | True to release a version. False to 'unrelease' a version |
This method will update all issues that currently have version
set as either affects or fix version to
the new affectsSwapVersion
or fixSwapVersion
Both affectsSwapVersion
or fixSwapVersion
may be undefined in which case the version
will
simply be removed from the issue.
user | The user that will be used to update related issues |
---|---|
version | The version to remove from issues |
affectsSwapVersion | Affects version to replace version with. May be undefined to simply remove the version. |
fixSwapVersion | Fix version to replace version with. May be undefined to simply remove the version. |
Persists updates to the specified version object.
version | the version |
---|