@PublicApi
public interface VersionManager
Modifier and Type | Field and Description |
---|---|
static String |
ALL_RELEASED_VERSIONS
Used to retrieve all released versions
|
static String |
ALL_UNRELEASED_VERSIONS
Used to retrieve all unreleased versions
|
static String |
NO_VERSIONS
Used to represent empty version fields
|
Modifier and Type | Method and Description |
---|---|
void |
archiveVersion(Version version,
boolean archive)
Archive/Un-archive a single version depending on the archive flag.
|
void |
archiveVersions(String[] idsToArchive,
String[] idsToUnarchive)
Method used to archive and un-archive a number of versions.
|
Version |
createVersion(String name,
Date startDate,
Date releaseDate,
String description,
Long projectId,
Long scheduleAfterVersion)
Creates a new
Version object. |
Version |
createVersion(String name,
Date releaseDate,
String description,
Long projectId,
Long scheduleAfterVersion)
Creates a new
Version object. |
void |
decreaseVersionSequence(Version version)
Move a version to have a higher sequence number - ie make it later
|
void |
deleteAndRemoveFromIssues(ApplicationUser user,
Version versionToRemove)
This method deletes a version and additionally (unlinke
deleteVersion(com.atlassian.jira.project.version.Version) ) removes it from all issues that reference it. |
void |
deleteVersion(Version version)
Removes a specific version from the system.
|
void |
editVersionDetails(Version version,
String name,
String description)
Updates details of an existing version.
|
void |
editVersionDetails(Version version,
String name,
String description,
org.ofbiz.core.entity.GenericValue project)
Deprecated.
use
editVersionDetails(Version, String, String) instead. since 5.0 |
void |
editVersionReleaseDate(Version version,
Date duedate)
Update the release date of a version.
|
void |
editVersionStartDate(Version version,
Date startDate)
Updates the start date of a version
|
void |
editVersionStartReleaseDate(Version version,
Date startDate,
Date releaseDate)
Updates the start and release date of a version
|
Collection<Version> |
getAffectedVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
Deprecated.
use
getAffectedVersionsFor(com.atlassian.jira.issue.Issue) instead. since 5.0 |
Collection<Version> |
getAffectedVersionsFor(Issue issue)
Get all affected versions of the specified issue.
|
Collection<org.ofbiz.core.entity.GenericValue> |
getAffectsIssues(Version version)
Deprecated.
use
getIssuesWithAffectsVersion(Version) instead. since 5.0 |
Collection<org.ofbiz.core.entity.GenericValue> |
getAllAffectedIssues(Collection<Version> versions)
Deprecated.
use
getIssueIdsWithAffectsVersion(Version) and getIssueIdsWithFixVersion(Version) instead. since 5.0 |
Collection<Version> |
getAllVersions() |
Collection<Version> |
getAllVersionsForProjects(Collection<Project> projects,
boolean includeArchived)
Returns all versions that belong to the passed projects.
|
Collection<Version> |
getAllVersionsReleased(boolean includeArchived) |
Collection<Version> |
getAllVersionsUnreleased(boolean includeArchived) |
Collection<org.ofbiz.core.entity.GenericValue> |
getFixIssues(Version version)
Deprecated.
use
getIssuesWithFixVersion(Version) instead. since 5.0 |
Collection<Version> |
getFixVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
Deprecated.
use
getFixVersionsFor(com.atlassian.jira.issue.Issue) instead. since 5.0 |
Collection<Version> |
getFixVersionsFor(Issue issue)
Get all fix for versions of the specified issue.
|
Collection<Long> |
getIssueIdsWithAffectsVersion(Version version)
Return all the issues in which the affects version matches the specified version.
|
Collection<Long> |
getIssueIdsWithFixVersion(Version version)
Return all the issues in which the fix version matches the specified version.
|
Collection<Issue> |
getIssuesWithAffectsVersion(Version version)
Return all the issues in which the affected version matches the specified version.
|
Collection<Issue> |
getIssuesWithFixVersion(Version version)
Return all the issues in which the fix for version matches the specified version.
|
Collection<Version> |
getOtherUnarchivedVersions(Version version)
Return all unarchived versions except this one
|
Collection<Version> |
getOtherVersions(Version version)
Return all other versions in the project except this one
|
Version |
getVersion(Long id)
Returns a single version.
|
Version |
getVersion(Long projectId,
String versionName)
Search for a version by projectID and name.
|
List<Version> |
getVersions(org.ofbiz.core.entity.GenericValue project)
Deprecated.
Use
getVersions(Long) or getVersions(Project) instead. Since 2006. |
Collection<Version> |
getVersions(List<Long> ids)
Return a collection of
Version s matching the ids passed in. |
List<Version> |
getVersions(Long projectId)
Return a list of Versions for the given project.
|
List<Version> |
getVersions(Long projectId,
boolean includeArchived)
Return a list of Versions for the given project.
|
List<Version> |
getVersions(Project project)
Return a list of Versions for the given project.
|
Collection<Version> |
getVersionsArchived(org.ofbiz.core.entity.GenericValue projectGV)
Deprecated.
Use
getVersionsArchived(Project) instead. Since v5.0. |
Collection<Version> |
getVersionsArchived(Project project)
Return all archived versions for a particular project.
|
Collection<Version> |
getVersionsByName(String versionName)
Return a collection of
Version s that have the specified name. |
Collection<Version> |
getVersionsReleased(Long projectId,
boolean includeArchived)
Gets a list of released versions for a project.
|
Collection<Version> |
getVersionsReleasedDesc(Long projectId,
boolean includeArchived)
Gets a list of released versions for a project in reverse order.
|
Collection<Version> |
getVersionsUnarchived(Long projectId)
Return all un-archived versions for a particular project
|
Collection<Version> |
getVersionsUnreleased(Long projectId,
boolean includeArchived)
Gets a list of un-released versions for a particular project.
|
void |
increaseVersionSequence(Version version)
Move a version to have a lower sequence number - ie make it earlier
|
boolean |
isDuplicateName(Version version,
String name)
Check that the version name we are changing to is not a duplicate.
|
boolean |
isDuplicateName(Version version,
String name,
org.ofbiz.core.entity.GenericValue project)
Deprecated.
use
isDuplicateName(Version, String) instead. since 5.0 |
boolean |
isVersionOverDue(Version version)
Checks to see if a version is overdue.
|
void |
merge(ApplicationUser user,
Version versionToDelete,
Version versionToMergeTo)
This method will perform a version merge.
|
void |
moveIssuesToNewVersion(List<org.ofbiz.core.entity.GenericValue> issues,
Version currentVersion,
Version swapToVersion)
Swaps the list of issues supplied from one Fix version to another.
|
void |
moveToEndVersionSequence(Version version)
Move a version to the end of the version sequence
|
void |
moveToStartVersionSequence(Version version)
Move a version to the start of the version list
|
void |
moveVersionAfter(Version version,
Long scheduleAfterVersion)
Move a version after another version
|
void |
releaseVersion(Version version,
boolean release)
Used to release or unrelease a version, depending on the release flag.
|
void |
releaseVersions(Collection<Version> versions,
boolean release)
Used to release versions depending on the release flag.
|
void |
swapVersionForRelatedIssues(ApplicationUser user,
Version version,
com.atlassian.fugue.Option<Version> affectsSwapVersion,
com.atlassian.fugue.Option<Version> fixSwapVersion)
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. |
Version |
update(Version version)
Persists updates to the specified version object.
|
List<ChangeItemBean> |
updateIssueAffectsVersions(Issue issue,
Collection<Version> newValue) |
List<ChangeItemBean> |
updateIssueFixVersions(Issue issue,
Collection<Version> newValue) |
static final String NO_VERSIONS
static final String ALL_UNRELEASED_VERSIONS
static final String ALL_RELEASED_VERSIONS
Version createVersion(String name, Date releaseDate, String description, Long projectId, Long scheduleAfterVersion) throws CreateException
Version
object.name
- the NamereleaseDate
- date of release or null if not released.description
- the DescriptionprojectId
- 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.Version createVersion(String name, Date startDate, Date releaseDate, String description, Long projectId, Long scheduleAfterVersion) throws CreateException
Version
object.name
- the NamestartDate
- start date of the version or nullreleaseDate
- date of release or null if not released.description
- the DescriptionprojectId
- 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.void moveToStartVersionSequence(Version version)
version
- the Version to movevoid increaseVersionSequence(Version version)
version
- the Versionvoid decreaseVersionSequence(Version version)
version
- the Versionvoid moveToEndVersionSequence(Version version)
version
- the Versionvoid moveVersionAfter(Version version, Long scheduleAfterVersion)
version
- version to reschedulescheduleAfterVersion
- id of the version to schedule after the given version objectvoid deleteVersion(Version version)
version
- The version to be removed.deleteAndRemoveFromIssues(com.atlassian.jira.user.ApplicationUser, Version)
@Deprecated void editVersionDetails(Version version, String name, String description, org.ofbiz.core.entity.GenericValue project)
editVersionDetails(Version, String, String)
instead. since 5.0version
- The version to updatename
- new namedescription
- new descriptionproject
- Used to check for duplicate version names in a project.IllegalArgumentException
- If the name is not set, or already exists.void editVersionDetails(Version version, String name, String description)
version
- The version to updatename
- The new version name, cannot be empty.description
- The description of this version.IllegalArgumentException
- If the name is not set, or already exists.boolean isDuplicateName(Version version, String name)
version
- The version to updatename
- The new name for the version@Deprecated boolean isDuplicateName(Version version, String name, org.ofbiz.core.entity.GenericValue project)
isDuplicateName(Version, String)
instead. since 5.0version
- The version to updatename
- The new name for the versionproject
- Used to check for duplicate version names in a project.void releaseVersion(Version version, boolean release)
version
- Version to be released (or unreleased)release
- True to release a version. False to 'unrelease' a versionvoid releaseVersions(Collection<Version> versions, boolean release)
versions
- Collection of Version
srelease
- True to release a version. False to 'unrelease' a versionvoid moveIssuesToNewVersion(List<org.ofbiz.core.entity.GenericValue> issues, Version currentVersion, Version swapToVersion) throws IndexException
issues
- the IssuescurrentVersion
- Current fix version they will be swapped fromswapToVersion
- New fix version they will be swapped to.IndexException
- if an error occurs will indexing these new issue values.void archiveVersions(String[] idsToArchive, String[] idsToUnarchive)
idsToArchive
- Archive all these VersionsidsToUnarchive
- Unarchive these Versionsvoid archiveVersion(Version version, boolean archive)
version
- the Version to archive or unarchivearchive
- new archive valueCollection<Version> getVersionsUnarchived(Long projectId)
projectId
- id of the project.Version
sCollection<Version> getVersionsArchived(org.ofbiz.core.entity.GenericValue projectGV)
getVersionsArchived(Project)
instead. Since v5.0.projectGV
- the ProjectVersion
sCollection<Version> getVersionsArchived(Project project)
project
- the ProjectVersion update(Version version)
version
- the versionvoid editVersionReleaseDate(Version version, Date duedate)
version
- the Version to editduedate
- new release datevoid editVersionStartDate(Version version, Date startDate)
version
- the version to editstartDate
- new start datevoid editVersionStartReleaseDate(Version version, Date startDate, Date releaseDate)
version
- the version to editstartDate
- new start datereleaseDate
- new release dateboolean isVersionOverDue(Version version)
version
- the VersionList<Version> getVersions(org.ofbiz.core.entity.GenericValue project)
project
- the ProjectList<Version> getVersions(Long projectId)
projectId
- the ProjectgetVersions(Project)
List<Version> getVersions(Long projectId, boolean includeArchived)
projectId
- the ProjectincludeArchived
- whether or not to include archived versionsgetVersions(Project)
List<Version> getVersions(Project project)
project
- the ProjectgetVersions(Long)
Collection<Version> getVersionsByName(String versionName)
Version
s that have the specified name.versionName
- the name of the version (case-insensitive)Collection<Version> getVersions(List<Long> ids)
Version
s matching the ids passed in.ids
- Version IDsVersion
s matching the ids passed in.Version getVersion(Long id)
id
- the Version IDVersion
object.Version getVersion(Long projectId, String versionName)
projectId
- the ProjectversionName
- the Version nameVersion
object.Collection<Version> getVersionsUnreleased(Long projectId, boolean includeArchived)
projectId
- The id of the project for which to return versionsincludeArchived
- True if archived versions should be includedVersion
s, never nullCollection<Version> getVersionsReleased(Long projectId, boolean includeArchived)
projectId
- project idincludeArchived
- flag to indicate whether to include archived versions in the result.Version
objectsCollection<Version> getVersionsReleasedDesc(Long projectId, boolean includeArchived)
projectId
- project idincludeArchived
- flag to indicate whether to include archived versions in the result.Version
objectsCollection<Version> getOtherVersions(Version version)
version
- the VersionCollection<Version> getOtherUnarchivedVersions(Version version)
version
- the Version@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getAllAffectedIssues(Collection<Version> versions)
getIssueIdsWithAffectsVersion(Version)
and getIssueIdsWithFixVersion(Version)
instead. since 5.0versions
- a collection of Version
objectsGenericValue
s@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getFixIssues(Version version)
getIssuesWithFixVersion(Version)
instead. since 5.0version
- the VersionGenericValue
sCollection<Issue> getIssuesWithFixVersion(Version version)
version
- the fixed for version.@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getAffectsIssues(Version version)
getIssuesWithAffectsVersion(Version)
instead. since 5.0version
- the VersionGenericValue
sCollection<Issue> getIssuesWithAffectsVersion(Version version)
version
- the affected version.Collection<Long> getIssueIdsWithAffectsVersion(@Nonnull Version version)
version
- the affects version.Collection<Long> getIssueIdsWithFixVersion(@Nonnull Version version)
version
- the fix version.@Deprecated Collection<Version> getAffectedVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
getAffectedVersionsFor(com.atlassian.jira.issue.Issue)
instead. since 5.0issue
- the IssueVersion
s for an issue.Collection<Version> getAffectedVersionsFor(Issue issue)
issue
- the issueList<ChangeItemBean> updateIssueAffectsVersions(Issue issue, Collection<Version> newValue)
List<ChangeItemBean> updateIssueFixVersions(Issue issue, Collection<Version> newValue)
@Deprecated Collection<Version> getFixVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
getFixVersionsFor(com.atlassian.jira.issue.Issue)
instead. since 5.0issue
- the IssueVersion
s for an issue.Collection<Version> getFixVersionsFor(Issue issue)
issue
- the IssueCollection<Version> getAllVersions()
Collection<Version> getAllVersionsForProjects(Collection<Project> projects, boolean includeArchived)
projects
- projects to search inincludeArchived
- whether or not to include archived versionsCollection<Version> getAllVersionsReleased(boolean includeArchived)
includeArchived
- whether or not to include archived versionsCollection<Version> getAllVersionsUnreleased(boolean includeArchived)
includeArchived
- whether or not to include archived versionsvoid swapVersionForRelatedIssues(ApplicationUser user, Version version, com.atlassian.fugue.Option<Version> affectsSwapVersion, com.atlassian.fugue.Option<Version> fixSwapVersion)
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 issuesversion
- The version to remove from issuesaffectsSwapVersion
- 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.merge(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.version.Version, com.atlassian.jira.project.version.Version)
,
deleteAndRemoveFromIssues(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.project.version.Version)
void merge(ApplicationUser user, @Nonnull Version versionToDelete, @Nonnull Version versionToMergeTo)
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 issuesversionToDelete
- Version that will be deletedversionToMergeTo
- All issues will have deleted version replaced with this onevoid deleteAndRemoveFromIssues(ApplicationUser user, @Nonnull Version versionToRemove)
deleteVersion(com.atlassian.jira.project.version.Version)
) removes it from all issues that reference it.user
- User that will perform the update of issues.versionToRemove
- Version to be deleted.Copyright © 2002-2015 Atlassian. All Rights Reserved.