To learn more about Tempo products, please visit our Help Center. For support, see our Support Portal.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

With the release of Tempo Timesheets 11, Planner 8, and Budgets 14, Tempo will be making changes to the Jira SPI and Jira REST API. This will result in the Tempo Team custom field being returned as an object rather than a string. It also will make it possible to update the Jira SPI with an object.

While it will still be possible to use the existing Jira REST API endpoints to update the team custom field with name or ID, it will no longer be possible to use the Jira SPI to do so.

You can see a detailed summary of the impacts that these changes will have below:

Jira SPI - Team Custom Field Changes

The team custom field is now returned as an object, but no longer supports updating by name name or ID.

The team custom field is now returned as an object (changed)

Issue issue = issueManager.getIssueObject("ABC-123");

CustomField teamCustomField = customFieldManager.getCustomFieldObject(111L);

Team result = (Team) teamCustomField.getValue(issue);

assertThat(result.getId()).isEqualTo(22);

assertThat(result.getName()).isEqualTo("Team awesome");

The team custom field can now be updated with an object (new)

Issue issue = issueManager.getIssueObject("ABC-123");

CustomField teamCustomField = customFieldManager.getCustomFieldObject(111L);

FieldLayout fieldLayout = fieldLayoutManager.getFieldLayout(issue);

Team team = teamManager.getTeamByName("Team awesome");

teamCustomField.updateValue(

       fieldLayout.getFieldLayoutItem(teamCustomField.getId()),

       issue,

       new ModifiedValue(teamCustomField.getValue(issue), team),

       new DefaultIssueChangeHolder());

Jira REST API - Team Custom Field Changes

The team custom field is now returned as an object, but can still be updated with name or ID.

The team custom field is now returned as an object (changed)

given()

       .get("/rest/api/2/issue/" + issueKey)

       .then().statusCode(HttpStatus.OK)

       .body("fields." + TEAM_FIELD_ID + ".id", equalTo(teamId))

       .body("fields." + TEAM_FIELD_ID + ".name", equalTo("Team Name"));

The team custom field can still be updated with ID

Map<String, Object> changes = ImmutableMap.of(

       "fields",

       ImmutableMap.of(TEAM_FIELD_ID, String.valueOf(teamIdSecond)));

given()

       .body(changes)

       .put("/rest/api/2/issue/" + issueKey)

       .then()

       .statusCode(HttpStatus.NO_CONTENT);

The team custom field can still be updated with name

Map<String, Object> changes = ImmutableMap.of(

       "fields",

       ImmutableMap.of(TEAM_FIELD_ID, teamName));

given()

       .body(changes)

       .put("/rest/api/2/issue/" + issueKey)

       .then()

       .statusCode(HttpStatus.NO_CONTENT);

  • No labels