Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Update section_id of cases from APIv2


#1

The API documentation for “update_case” states:

The problem with this, however, is that “section_id” is not a supported JSON param of the “add_case” method. (It is set in the URL.) It seems that I can only set the section_id when I add a test case.

Thus, when I try to update a test case with the following params:

{"title":"new_name","section_id":61013}

I get the the following reply from the server. The section id isn’t updated.

{[...],"section_id":15216,"title":"new_name",[...]}

I have verified that this is a valid section_id and the section is in the same suite as the test case I’m trying to update. I have no problems when using the section_id in the “add_case” URL. This issue only occurs with “update_case”.


#2

Hello,

Thanks for your posting. Yes, update_case currently doesn’t support the section ID and we’ve just updated the documentation for this. There’s currently no workaround for this other than moving the section via TestRail’s user interface unfortunately. I’ve added section support for update_case to our todo list for now.

If you have access to TestRail’s database, please don’t change this directly in the database as there are more steps involved than just updating the section_id field. Changing the section directly in the database without knowing the consequences/effects would most likely lead to inconsistencies of the section/case hierarchy.

Regards,
Tobias


#3

I found this thread while searching for a solution to the same issue as the original poster. I would like to add my support to the TestRail API supporting the updating of a case’s section_id


#4

Thanks for your feedback, Alex! I’m happy to add your vote to our feature request list.

Cheers,
Tobias


#5

Add another vote, please.


#6

Hi Bullrich,

Thanks for your feedback, vote added!

Regards,
Marco