YouTrack Standalone 2017.3 Help

Add New State to a Bundle

PUT /admin/customfield/stateBundle/{bundleName}/{stateName}

Add new state to bundle

PUT /rest/admin/customfield/stateBundle/{bundleName}/{stateName}?{isResolved}&{description}&{colorIndex}

Parameters:

Name

Type

Description

bundleName

string

Name of a state bundle to which a new state should be added.

stateName

string

Name of a new state.

isResolved

boolean

Mark new state as 'resolved'.

description

string

State description.

colorIndex

Integer

Sequential number of a color scheme (background color/text color pair) for the new state. See the list of available Color Indices List

Samples

Sample 1

Request

PUT https://example.com/youtrack/rest/admin/customfield/stateBundle/States%20Bundle1/new%20state?isResolved=true&description=PROFIT%21%21%21+120 Cookie: $Version=0; JSESSIONID=1xubq236wmpbd14yd1mhq4jcrw; $Path=/; jetbrains.charisma.main.security.PRINCIPAL=NDgxMzQ5NGQxMzdlMTYzMWJiYTMwMWQ1YWNhYjZlN2JiN2FhNzRjZTExODVkNDU2NTY1ZWY1MWQ3Mzc2NzdiMjpyb290; $Path=/

Response

HTTP/1.1 201 Created Content-Type: application/xml;charset=UTF-8 Location: https://example.com/youtrack/rest/admin/customfield/stateBundle/States%20Bundle1/new%20state Content-Length: 0

Sample 2

Request

PUT https://example.com/youtrack/rest/admin/customfield/stateBundle/States%20Bundle1/Uvalue2 Cookie: $Version=0; JSESSIONID=1xubq236wmpbd14yd1mhq4jcrw; $Path=/; jetbrains.charisma.main.security.PRINCIPAL=NDgxMzQ5NGQxMzdlMTYzMWJiYTMwMWQ1YWNhYjZlN2JiN2FhNzRjZTExODVkNDU2NTY1ZWY1MWQ3Mzc2NzdiMjpyb290; $Path=/

Response

HTTP/1.1 409 Conflict Content-Type: application/xml;charset=UTF-8 Content-Length: 103 <?xml version="1.0" encoding="UTF-8" standalone="yes"?><error>State [ Uvalue2 ] already exists.</error>

Sample 3

Request

PUT https://example.com/youtrack/rest/admin/customfield/stateBundle/New%20Name%20with%20spaces/Rvalue%204?isResolved=true Cookie: $Version=0; JSESSIONID=1xubq236wmpbd14yd1mhq4jcrw; $Path=/; jetbrains.charisma.main.security.PRINCIPAL=NDgxMzQ5NGQxMzdlMTYzMWJiYTMwMWQ1YWNhYjZlN2JiN2FhNzRjZTExODVkNDU2NTY1ZWY1MWQ3Mzc2NzdiMjpyb290; $Path=/

Response

HTTP/1.1 201 Created Content-Type: application/xml;charset=UTF-8 Location: https://example.com/youtrack/rest/admin/customfield/stateBundle/New%20Name%20with%20spaces/Rvalue%204 Content-Length: 0
Last modified: 7 March 2019