Skip Navigation LinksHome Page > Forums > SpiraTest Forums > SpiraTest Issues & Questi... > API: Obtain list of child...
Currently, I'm trying to find a way to calculate contribution of each requirement's weight within whole requirement structure.
I already have a custom property on requirement level named Weight (it takes values from a list 2^n where n>0 and n<10 i.e 2,4,8,16...1024). So I want to compare all requirements on the same indentation level to get their relative contribution in terms of that Weight values.
So, my question is, as stated in the title - is there any way to get the list of children requirements of a particular requirement using API?
In general, this API call retrieves requirements based on a filter:
However I don't think it will get requirements that are children of a specific one, it relies on filtering by a field.
I would log a help desk ticket to get an enhancement raised since it is a good idea.
Thanks for your reply. I managed to successfully get the list of direct children requirements by using IndentLevel property. If parent is known, its direct children (only) have a length of IndentLevel property that is 3 greater than parent's IndentLevel, and child's IndentLevel property substring after trimming the last three chars is the same as their parent's IndentLevel. Nevertheless, it would be quite useful to have a parentId property, if possible.
And if you have any questions, please email or call us at +1 (202) 558-6885