While in Rally, a user is trying to add a task to a defect but is unable to do so. A red flare is returned as follows; Looks like there was a problem. Validation error: Defect.TestCase is an invalid relationship.
Other users are receiving the same error, this user has Project administration rights. Other defects in this project did allow the user to add tasks.
This has also been seen as:
When trying to change projects on this story I get the error: Validation error: Task.milestoneScope is an invalid relationship. One or more of the artifacts is in a different project
I removed all tasks from the story and there are no children etc. and still get the error
The defect in question had one task associated but no test cases. The defect was parented by a user story which had many test cases associated to the user story. The user story was cleared as a parent and then tasks were able to be created under the defect. The user story was then re-parented to the defect and tasks were still able to be created. The user story was over 2 years old and had many test cases associated to it. It is likely that some of the associations needed to be refreshed or re-established by un-parenting and re-parenting the user story to the defect.
For the milestone issue above this was the resolution: I removed all parents/milestones/tasks and still had the issue. I re-added the Milestone and then shared the Milestone with the project the story is moving to.