-
Bug
-
Resolution: Fixed
-
High
-
10.128.3
-
1
-
Severity 2 - Major
-
No
Issue Summary
The ADO connector sync with Jira Align stopped working after configuring new work items under the Story tab.
Steps to Reproduce
- Go to ADO connector Setup in Jira Algin
- Go to the Items tab > Story
- Add new ADO work items such as DesignSpike, Action, and Issue
- Map these ADO new work items to Jira Align story type values as Spike, Action, and Issue
- Make sure that the Tasks are also enabled
- In Azure DevOps
- Create a new work item for one of the new mapped types: DesignSpike, Action, or Issue (for instance 'TestAction') and save
- Add to the work item 'TestAction' a link to a new child task ' 'TestActionChildTask' and save
Expected Results
The ADO connecter is to be synced with the new work items.
Actual Results
The Story for the work item Action is created but not the child task.
The error is seen when syncing the task:
{ [-] Exception: System.InvalidCastException: Unable to cast object of type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsWorkItem' to type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsUserStory'. at AgileCraft.Integration.Tfs.Core.Model.TFS.TFSTask.get_Story() in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\Model\TFS\TfsTask.cs:line 30 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncTasks(TfsProject project) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 4013 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncWorkItems(TfsProject project) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 4134 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncAllProjectWorkItems(LastSyncManager lastSyncManager) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 268 Level: Error MessageTemplate: Sync All Projects Work Items Failed Properties: { [-] AdoConnectorUserId: da0a3fda-b883-65d9-b0ce-e380e5882385 AdoConnectorUserIsActive: true Build: 10.129.0.27825 ConnectorId: 13 CorrelationId: 3747fcb61d404173974646f0a33ca82c Customer: alignsupporttest Direction: TO Jira Align Event: OnElapsedTimer ExceptionDetail: { [-] HResult: -2147467262 Message: Unable to cast object of type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsWorkItem' to type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsUserStory'. Source: AgileCraft.Integration.Tfs.Core StackTrace: at AgileCraft.Integration.Tfs.Core.Model.TFS.TFSTask.get_Story() in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\Model\TFS\TfsTask.cs:line 30 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncTasks(TfsProject project) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 4013 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncWorkItems(TfsProject project) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 4134 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncAllProjectWorkItems(LastSyncManager lastSyncManager) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 268 TargetSite: AgileCraft.Integration.Tfs.Core.Model.TFS.TfsUserStory get_Story() Type: System.InvalidCastException } Interval: Normal Method: Elapsed_WorkItemTimer Product: AgileCraft.Integration.Tfs ServiceName: AgileCraft_TFS_alignsupporttest SourceContext: AgileCraft.Integration.Tfs.Core.WorkItemSyncManager } Timestamp: 2024-01-26T06:29:20.6914565-05:00 }
Additionally, the following error is visible:
{ [-] Exception: System.InvalidCastException: Unable to cast object of type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsWorkItem' to type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsUserStory'. at AgileCraft.Integration.Tfs.Core.Model.TFS.TFSTask.get_Story() in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\Model\TFS\TfsTask.cs:line 30 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncTask(TFSTask tfstask, Task taskToUpdate, ICollection`1 localTasks, ICollection`1 acStories, IACDContext context) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 3016 Level: Error MessageTemplate: AdoTestProject Project: Error on Task - ExternalId: 160, title: ProjTestTask2 Properties: { [-] AdoConnectorUserId: da0a3fda-b883-65d9-b0ce-e380e5882385 AdoConnectorUserIsActive: true Build: 10.129.0.27825 ConnectorId: 13 CorrelationId: 3747fcb61d404173974646f0a33ca82c Customer: alignsupporttest Direction: TO Jira Align Event: OnElapsedTimer ExceptionDetail: { [-] HResult: -2147467262 Message: Unable to cast object of type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsWorkItem' to type 'AgileCraft.Integration.Tfs.Core.Model.TFS.TfsUserStory'. Source: AgileCraft.Integration.Tfs.Core StackTrace: at AgileCraft.Integration.Tfs.Core.Model.TFS.TFSTask.get_Story() in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\Model\TFS\TfsTask.cs:line 30 at AgileCraft.Integration.Tfs.Core.WorkItemSyncManager.SyncTask(TFSTask tfstask, Task taskToUpdate, ICollection`1 localTasks, ICollection`1 acStories, IACDContext context) in C:\projects\alignintegration\Connectors\TFS\AgileCraft.Integration.Tfs.Core\SyncManagers\WorkItemSyncManager.cs:line 3016 TargetSite: AgileCraft.Integration.Tfs.Core.Model.TFS.TfsUserStory get_Story() Type: System.InvalidCastException } Interval: Normal Method: Elapsed_WorkItemTimer Product: AgileCraft.Integration.Tfs ServiceName: AgileCraft_TFS_alignsupporttest SourceContext: AgileCraft.Integration.Tfs.Core.WorkItemSyncManager adoProject: AdoTestProject alignWorkItemType: Task } Timestamp: 2024-01-26T05:50:45.4688709-05:00 }
This error will be seen in the connector logs view in Jira Align as well.
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available