Hi Derek.
Matt is correct.
You can add the Defect to each Test Case object. That will auto-update the TestCases collection field on the Defect object. You can not modify the TestCases field because it's a read-only collection.
This is explained in the
WSAPI documentation : Check out the link to 'Collections' under the 'Topics' section on the left-hand side. It explains that adding/removing objects to collection fields is allowed only to Modifiable collections, not read-only, here is where it's explained:
Adding Collection Members
Items can be added to Modifiable collections by sending a POST
request to a collection reference url with a body containing an array of items to add.
Thanks much Matt for helping!
Sagi
Original Message:
Sent: 11-14-2019 01:25 PM
From: Matt Seitz
Subject: Linking a defect to multiple test cases
Just a guess off the top of my head, haven't validated this: instead of going to the Defect object and trying to update the TestCases field, how about going to each Test Case and setting the WorkProduct field to be the Defect. Example: if you want to link Defect DE123 to TestCases TC456 and TC789:
1. Modify TestCase TC456 by setting the WorkProduct field to DE123
2. Modify TestCase TC789 by setting the WorkProduct field to DE123
Original Message:
Sent: 11-14-2019 10:33 AM
From: Derek Bergin
Subject: Linking a defect to multiple test cases
The API docs infer that there is a one-many link between defect and test case(s) - the TestCases entry. However this is marked as a read-only collection. So that we don't have to create new defects for multiple test cases all failing for the same reason - how can I cause this to be populated?
Thanks
Derek