Rally - Jira Adapter - syncing status to Jira and overriding the JiraWorkflow
search cancel

Rally - Jira Adapter - syncing status to Jira and overriding the JiraWorkflow

book

Article ID: 207800

calendar_today

Updated On:

Products

Rally SaaS

Issue/Introduction

When syncing Rally Features > Jira Epic, we would also like to sync the State > Status. We have set the mys:integration_settings option overrideJiraWorkflow to "1". However, it is still only possible to sync certain statuses and others return the following error:
"No transition path found from undefined to undefined.Other updates were made successfully, but the transition was not."
 
It is e.g. possible to change the following statuses (original Jira status > updated Jira status):
New > In Definition
In Definition > New
New > In Definition
Anything > Done 
 
However, we get the transition error e.g. in these cases:
New > In Development
In Definition > In Development
Done > New
 
Do you know if there is a way for the Adapter to sync from any status to any other status and override the Jira workflow transitions? As I said, we have the setting  overrideJiraWorkflow set to "1".

Environment

Release : 1.0

Component : LIVE API CREATOR

Resolution

Overriding Transitions in Jira

By default, transitions are not overridden in Jira. If the desired transition is not available, then an error will be thrown and the transition won't be made. When an error is thrown due to a transition failure, all fields other than the transition still synced successfully.

To enable overriding the Jira Transition Workflow, the following must be true:

1. The "overrideJiraWorkflow" integration setting should exist and be non-zero

2. For each status field defined in the jira_field_def table for a system and object_type that has a workflow, the workflow rules must be saved as a JSON string in the configuration_data field of the jira_field_def table. See below for expected formatting of workflow rules.

If overrideJiraWorkflow is set but there are no workflow rules defined in the configuration_data field of a status record in the jira_field_def, then the behavior will revert back to the same behavior as expected if the overrideJiraWorkflow is not enabled for that particular status field only (other correctly configured status fields will operate as expected for overrideJiraWorkflow behavior).

Note: Transition overrides can only be used for fields where we are mapping the name as the user_attribute. They will not work for fields using statusCategory.name as the user_attribute.

Example of JSON string for configuration_data to override workflow is below.  Basically, for each state, there should be an array of statuses and their subsequent ids that the status key can transition to in Jira.  With this information, the adapter will find the shortest path to from the start state to the end state: 

{  
"Idea": [ { "id": "21", "name": "To Do" }, { "id": "31", "name": "In Progress" } ],
"To Do": [{"id": "31", "name": "In Progress"},{"id": "11", "name": "Idea"}]
"In Progress": [ { "id": "11", "name": "Idea" }, { "id": "21", "name": "To Do" }, { "id": "41", "name": "Done" }],
"Done": [ { "id": "31", "name": "In Progress" }]
}