com.atlassian.jira.rest.v2.issue
Class VersionResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.issue.VersionResource

public class VersionResource
extends Object

Since:
4.2

Constructor Summary
VersionResource(VersionService versionService, ProjectService projectService, JiraAuthenticationContext authContext, I18nHelper i18n, VersionBeanFactory versionBeanFactory, VersionIssueCountsBeanFactory versionIssueCountsBeanFactory, VersionUnresolvedIssueCountsBeanFactory versionUnresolvedIssueCountsBeanFactory, DateFieldFormat dateFieldFormat)
           
 
Method Summary
 javax.ws.rs.core.Response createVersion(VersionBean bean)
          Create a version via POST.
 javax.ws.rs.core.Response delete(String id, String moveFixIssuesTo, String moveAffectedIssuesTo)
          Delete a project version.
 javax.ws.rs.core.Response getVersion(String id, String expand)
          Returns a project version.
 javax.ws.rs.core.Response getVersionRelatedIssues(String id)
          Returns a bean containing the number of fixed in and affected issues for the given version.
 javax.ws.rs.core.Response getVersionUnresolvedIssues(String id)
          Returns the number of unresolved issues for the given version
 javax.ws.rs.core.Response moveVersion(String id, VersionMoveBean bean)
          Modify a version's sequence within a project.
 javax.ws.rs.core.Response updateVersion(String id, VersionBean bean)
          Modify a version via PUT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionResource

public VersionResource(VersionService versionService,
                       ProjectService projectService,
                       JiraAuthenticationContext authContext,
                       I18nHelper i18n,
                       VersionBeanFactory versionBeanFactory,
                       VersionIssueCountsBeanFactory versionIssueCountsBeanFactory,
                       VersionUnresolvedIssueCountsBeanFactory versionUnresolvedIssueCountsBeanFactory,
                       DateFieldFormat dateFieldFormat)
Method Detail

getVersion

public javax.ws.rs.core.Response getVersion(String id,
                                            String expand)
Returns a project version.

Parameters:
id - a String containing the version id
Returns:
a project version

updateVersion

public javax.ws.rs.core.Response updateVersion(String id,
                                               VersionBean bean)
Modify a version via PUT. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored.


createVersion

public javax.ws.rs.core.Response createVersion(VersionBean bean)
Create a version via POST.


delete

public javax.ws.rs.core.Response delete(String id,
                                        String moveFixIssuesTo,
                                        String moveAffectedIssuesTo)
Delete a project version.

Parameters:
id - The version to delete
moveFixIssuesTo - The version to set fixVersion to on issues where the deleted version is the fix version, If null then the fixVersion is removed.
moveAffectedIssuesTo - The version to set affectedVersion to on issues where the deleted version is the affected version, If null then the affectedVersion is removed.
Returns:
An empty or error response.

getVersionRelatedIssues

public javax.ws.rs.core.Response getVersionRelatedIssues(String id)
Returns a bean containing the number of fixed in and affected issues for the given version.

Parameters:
id - a String containing the version id
Returns:
an issue counts bean

getVersionUnresolvedIssues

public javax.ws.rs.core.Response getVersionUnresolvedIssues(String id)
Returns the number of unresolved issues for the given version

Parameters:
id - a String containing the version id
Returns:
an unresolved issue count bean

moveVersion

public javax.ws.rs.core.Response moveVersion(String id,
                                             VersionMoveBean bean)
Modify a version's sequence within a project. The move version bean has 2 alternative field value pairs:
position
An absolute position, which may have a value of 'First', 'Last', 'Earlier' or 'Later'
after
A version to place this version after. The value should be the self link of another version

Parameters:
id - a String containing the version id
bean - a MoveVersionBean that describes the move to be performed.
Returns:
a project version


Copyright © 2002-2013 Atlassian. All Rights Reserved.