Can't Get Workflow Scheme for Project while Syncing Statuses

    Problem

    You're syncing statuses with the Jira Cloud instance and you've got an error that mapping cannot be found. 

    Error Details:
    javax.script.ScriptException: com.exalate.api.exception.IssueTrackerException: 
    Can not get workflow scheme for project `TEST`. Known projects / workflow schemes: `[:]` Please contact Exalate Support. 
    Also failed to get it through REST API: Request: GET /rest/projectconfig/1/workflowscheme/TEST 

    Exalate Error: Can not get workflow scheme for project

    Cause

    If the statuses don't have global transitions Exalate cannot get the status mapping.

    Unfortunately, Jira Cloud REST API does not allow getting all statuses from a workflow of an issue.  

    Solution

    There is an unofficial REST API provided by Jira's project-config plugin you can use to get the required data.

    You need to retrieve the workflow scheme in order to configure additional mapping with the workflow scheme details:

    • map project key to the workflow scheme ID.
    • workflow scheme ID to workflow details(all workflow details and configuration settings).
    • workflow name to workflow details(all workflow details and configuration settings).

    Note: The error message helps to get the REST request Oath by detecting the workflow name and the project key from the previously retrieved workflow scheme.