Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi dear Community,
I would like to check, how many ancestors have the working item, using computed field.
I found some information about function "ancestors()" , but it didn't work in my case.
I have the codeBeamer version 2.1.0.0 (postgresql).
Thank you in advance!
Hi @vjub58 ,
When you say the ancestors() function did not work for you, could you explain a bit further. i.e. what are you expecting as a result, and what was ancenstors() giving you when you tried to use it?
Hi @tymorrow ,
I'm expecting the ancestors() function returns a list of all item's ancestors, and size(ancestors()) returns the size of this list, i.e. the number of ancestors of this item.
When I try to use the ancestors() function in computed field, the expression is not evaluated properly and error message (like "ancestors()" is unknown") has been appeared.
Hi @vjub58,
I've tried this function in a new default Codebeamer project, and I see the same error. This does not appear to be an out-of-the-box function. I am actually seeing similar results when I attempt to use "size(ancestors())".
You can use "this.parent" to retrieve the first item up in the hierarchy, though you need to write some creative recursion for this to pull up a full list of ancestors. Please review the supported and available functions here: https://codebeamer.com/cb/wiki/25722#section-Functions
Hi @vjub58,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag
Hi Anurag,
unfortunately we couldn't yet find the right solution here by the moment.
I would like to still wait for the answers from other members.
Thanks for your attention to the topic,
Valeriy