API of getting details of workflow rules does not return the transition details

Hi,

We are using the API https://your-site.atlassian.net/rest/atlassian-connect/1/migration/workflow/rule/search described in step 3 of the migration tutorial (https://developer.atlassian.com/platform/app-migration/migration-app-workflow-rules/) to retrieve the details of workflow rules based on workflow rule keys

According to the tutorial, we would expect the API to return a list of valid and invalid rules as following:

{
  validRules: [{
       workflowId: ...,
       postFunctions: ConnectWorkflowTransitionRule[];
       conditions: ConnectWorkflowTransitionRule[];
       validators: ConnectWorkflowTransitionRule[];
  }],
  invalidRules: [],
  ...

Also according to the screenshot at the bottom of the tutorial, the ConnectWorkflowTransitionRule type has the information of the transition associated with that rule.

However, the API returned a result that does not have the transition field for ConnectWorkflowTransitionRule, thus it is not possible to know which transition a post function/validator/condition belongs to

We tried to use /rest/atlassian-connect/1/migration/workflow/rule/search?expand=transition but it didn’t work either

So is there a way to include the transition information in the workflow rule details?

Thanks in advance

Long

Hi @LongLe,

Thanks for the post. We’ve been looking at this and it’ll take a little longer to determine what’s happening.

We’ll post an update here when we’ve got an update.

Regards,
James.

Hi @LongLe,

When you send the POST request to fix the migration rules you need to add a

    "expand": "transition"

field. Like this

{
    {
        "workflowEntityId": "4bd1e4f7-7941-4690-a4f1-a29d716c376f",
        "expand": "transition",
        "ruleIds": [
            "86e76ef7-a57a-4ad5-a1bc-d58330e11e7bd"
        ]
    }
}

This isn’t documented clearly so we’ll be adding that to the documentation soon.

Regards,
James.

hi James,

I’ve updated our code to include that field in the request as you said, and it works beautifully now.

Thanks a bunch

Long