I'm using the following IF statement to count the number of issues which test a given issue:
IF (issueLinks.FILTER($.type.inward = "tested by" AND $.destination = this)
; CONCAT(SIZE(issueLinks.FILTER($.type.inward = "tested by" AND $.destination = this)); " Tests")
; "*No Coverage*")
I'd like it to be grammatically correct and if the SIZE is less than 2, it concatenates the word "test" rather than "tests", but I can't figure out the syntax to nest the IF statements correctly.
Hello @Dan Giordano
if you just need to count the number of specific links, you can use a simpler formula like this:
if issueLinks.FILTER($.type.inward = "tested by" AND $.destination = this).size() >0: "test" else "No coverage"
I hope this helps. If you need further assistance here, please reach out to us directly at our support portal.
Best regards,
Stepan
Tempo (the Structure app vendor)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've fumbled into this slightly more efficient version, but still don't fully understand how the syntax works so I can distinguish when the SIZE is 1 or greater than 1
WITH testcount = SIZE(issueLinks.FILTER($.type.inward = "tested by" AND $.destination = this)):
IF issuetype = 'Test' OR itemtype = "Folder":
""
ELSE IF (issueLinks.FILTER($.type.inward = "tested by" AND $.destination = this);
CONCAT(testcount; " Tests");
("*No Coverage*"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.