I am trying to filter Subtasks in for statement like below, its not working.
not sure what am I doing wrong, Please suggest.
#{for s=Links[n].SubtasksCount|filter=%{(!'${Links[n].subtasks[s].Status}'.equals('CANCELLED'))}}
Key:${Links[n].Subtasks[s].Key}
summary:${Links[n].Subtasks[s].Summary}
#{end}
Anyways. I figured it out what's the issue is.
in the filter statement I was using subtasks[s].Status s should start with upper case Subtasks[s].Status
this one worked:
#{for s=Links[n].SubtasksCount|filter=%{(!'${Links[n].Subtasks[s].Status}'.equals('CANCELLED'))}}
Key:${Links[n].Subtasks[s].Key}
status:${Links[n].Subtasks[s].Status
#{end}
Thank you for your help!
Hi @kranthi kumar g j -- Welcome to the Atlassian Community!
First thing, I am using Jira Cloud and not Data Center, and so cannot test my suggestion.
I believe the default attribute for Status is the id and not the name. Perhaps try adding .name after the status field to compare to "CANCELLED". Also, please confirm the case of the status name matches your comparison value.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bill for your inputs!
I tried adding .name after status, no luck. it did not filter
how ever i see that status is working if i just tried to print. please see below
#{for s=Links[n].SubtasksCount|filter=%{(!'${Links[n].subtasks[s].Status}'.equals('CANCELLED'))}}
Key:${Links[n].Subtasks[s].Key}
status:${Links[n].Subtasks[s].Status
#{end}
in the above code,i see that status is being printed.
also, I can confirm that Status name matches the comparison value.
I am new to JIRA , can you tell me how can i confirm if iam using Jira cloud or datacenter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That version information indicates you are not on Jira Cloud; I do not believe there is any UI in Jira Cloud showing version information (except for the addons / apps).
Here is the list of Server / Data Center release notes: https://confluence.atlassian.com/jirasoftware/jira-software-release-notes-776821069.html
Again, I am not using Data Center and so the attribute information appears to be different. Perhaps wait for other community members to respond, or also search in the developer community area: https://community.developer.atlassian.com/
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.