Confluence has been updated to ver 6.15.9. In case of any troubles, please contact infra team.


1 answer


    From the incoming processor, is it possible to get the Tempo Java API to get an account and assigning to a custom field:

    import com.atlassian.jira.component.ComponentAccessor
    def exaPlugin = ComponentAccessor.pluginAccessor.getEnabledPlugin("com.tempoplugin.tempo-accounts")
    def exaCl = exaPlugin.getClassLoader()
    def essClass = exaCl.loadClass("com.tempoplugin.accounts.account.api.AccountService")
    def ess = ComponentAccessor.getOSGiComponentInstanceOfType(essClass)
    def projectId = issue.project?.id ?: nodeHelper.getProject(issue.projectKey).id
    def allAccountsForProject = ess.getAccountsByProject(projectId).get()
    //Other methods: getAccounts(boolean), getAccountId(java.lang.String), getAllAccounts(), getAccountById(int), getAccountByIds(java.util.Set).
    //This is an example where the field is set from a default CF
    //String accountName = replica.customFields."Account".value
    String accountName = "The Account"
    issue.customFields."Account".value = allAccountsForProject.find{acc -> == accountName}
      CommentAdd your comment...