Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For the above versions of the Tempo add-ons we implemented a change on how the Tempo Team custom field is returned and populated from the Jira SPI. This change affects possible integrations and apps that work with Tempo . We are now returning a Team object instead of the Team ID only. The class we changed is named TeamCustomField and it is implementing the CustomField Jira SPIwhich are relying on the Jira SPI instead of using the Jira REST API.

The TeamCustomField object now returns and is populated with a team object.

The Custom Field SPI is documented here:
https://docs.atlassian.com/software/jira/docs/api/8.0.0/com/atlassian/jira/issue/fields/CustomField.htmlAnd the method in question is getValue.

That means that if you have implemented a solution like this:

var To read the team/teamId from an issue:

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

CustomField teamCustomField = customFieldManager.getCustomFieldObjectByNamegetCustomFieldObject('"Team'");

var teamId = teamCustomField.getValue(issue)

It will fail and it needs to be changed to:

var teamCustomField = customFieldManager.getCustomFieldObjectByName('Team')

var teamId = teamCustomField.getValue(issue).getId()Team team = (Team) issue.getCustomFieldValue(teamCustomField);

int teamI = team.getId();

If you are using the Jira SPI to write or update  the value of the Tempo Team field you should amend your code accordingly:


To update the team on an issue:

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

CustomField teamCustomField = customFieldManager.getCustomFieldObject("Team");

Team team = teamService.getTeamByName("My Best Team").get();

issue.setCustomFieldValue(teamCustomField, team);


If you encounter issues and require more information, please contact our Support team

...