I am using a following saved filter:
issuetype=Feature OR (issuetype=Story AND (hasLinks != "is child of" OR hasLinks is EMPTY))
This filters Feature type tickets and those Stories that have no parent of any kind. It used to work for me but appearantly something changed and now when I try to edit that filter, I get an error:
Field 'hasLinks' does not exist or you do not have permission to view it.
Strangely the saved filter appears to still be working, however incorrectly (not showing any Stories that should be found).
What could have changed? Could this be related to some Jira Cloud upstream change? Or maybe someone made some changes to my permissions?
I still see in the documentation of ScriptRunner that this is the right way to query.
I have also checked that I can go to the ScriptRunner enhanced search and everything works for me in there... Except the hasLinks thing.
Hello @Bart Celary
According to the documentation for ScriptRunner, the version for self-hosted included the hasLinks functionality but the version for Cloud does not. Reference
https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/jql-functions
https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/jql-keywords
Which Scriptrunner documentation are you referencing? Perhaps you're looking at the documentation for the Jira DC version?
Please note the changes made in the August 2023 release notes here: https://docs.adaptavist.com/es/latest/release-notes
For example, you could use issueLinkType
(which is provided by Atlassian here) in queries where you currently use hasLinks
to search for issues based on the type of issue links you have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great Scott! Yes - reading release notes FTW! Thanks for the find, I will try some workarounds.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, it seems that it is not possible to obtain the same result using `issueLinkType`:
issuetype=Feature OR (issuetype=Story AND (issueLinkType != "is child of" OR issueLinkType is EMPTY))
Unless I am doing something obviously wrong, this query shows me Stories that are child of Features.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you look at the documentation I provided
...you will see that it it recommends the use of a new keyword numberOfLinks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the remark. I never considered this because it does not help with the command I am trying to replace after `hasLinks` was deprecated.
However, I have found a workaround suggested by my colleague.
Create a named filter (call it X):
issuetype=Story AND issueLinkType = "is child of"
Use it as negation:
issuetype=Feature OR (issuetype=Story and filter!="X")
This is now filtering for issues that are either Features or Stories that have no parents.
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.
@Bart Celary
I think I found what is the issue.
Unlike Atlassian documentation : https://support.atlassian.com/jira-software-cloud/docs/jql-fields/#Issue-link-type
1. You need to put the link name not the inward or outward to make it works.
2. You can use numberOfLinks = 0
See
project = NEXTG
AND issuetype = Story
AND resolution = Unresolved
AND status not in (Open, "Spec Writing")
AND "Need Test Coverage[Radio Buttons]" = Yes
AND (issueFunction in linkedIssuesOf("issuetype = Test
AND status not in (done, Review,"Postponed")", "tests")
OR issueLinkType != test
OR numberOfLinks = 0)
AND ("BE Story points[Number]" is not empty OR "FE Story points[Number]" is not empty OR "Story Points[Number]" is not empty) ORDER BY status DESC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks - see the other thread for how we were able to solve it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.