Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-25640

JQL function for showing all issues linked to any issue by a given issue link type

    • 828
    • 70
    • Hide
      Atlassian Update – 21 December 2018

      Dear Jira users,

      We’re glad to announce that this issue will be addressed in our upcoming 8.0 release.

      You can find more details about our 8.0 beta release here — https://community.developer.atlassian.com/t/beta-for-jira-8-0-is-up-for-grabs/25588

      Looking forward to your feedback!

      Kind regards,
      Syed Masood
      Product Manager, Jira Server and Data Center

      Show
      Atlassian Update – 21 December 2018 Dear Jira users, We’re glad to announce that this issue will be addressed in our upcoming 8.0 release. You can find more details about our 8.0 beta release here — https://community.developer.atlassian.com/t/beta-for-jira-8-0-is-up-for-grabs/25588 Looking forward to your feedback! Kind regards, Syed Masood Product Manager, Jira Server and Data Center
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      originally copied from this comment

      Function linkedIssues() only shows the issues linked to a particular issue, I want to find all issues those are linked to other issues marked by a specific link type, e.g., "is blocked by".

      This function could incorporate querying issues that are linked to any issue with a given link type and bearing in mind that links have two identities, one in each direction, the link type could be direction specific or not.

      Examples

      1. find all issues that are duplicates of issue JRA-25640 (one direction, issue specified)
      2. find all issues that are blocking issue JRA-25640 or that JRA-25640 blocks (bidirectional, issue specified)
      3. find all issues that are duplicates of any issue, or which duplicate any issue (bidirectional, no issue specified)
      4. find all issues that are blocked (one direction, no issue specified)
      5. find all issues that are linked to a specific issue and display those based on a specific depth (linked issues displaying linked relationship two, three, etc., issues deep)

      Implementation Notes

      • The JQL function that exists must continue to work exactly as it does. If it is possible to overload the JQL function based on arity and this makes a consistent API, then this would be preferred. Otherwise, there may need to be a new function name which provides vararg behaviour as described above.
      • The link index entries added in 4.4 (I think) provide enough to build performant lucene queries for the above use cases. What's missing is the JQL function plumbing.

            [JRASERVER-25640] JQL function for showing all issues linked to any issue by a given issue link type

            Thank you for the thorough explanation.

            David Skreiner added a comment - Thank you for the thorough explanation.

            Dave Meyer added a comment -

            Hi david.skreiner,

            I feel obligated to say that there is absolutely no such policy. Our only goal, as a product team, is to build the best product possible for as many customers as possible. Obviously, promoting a vibrant and healthy ecosystem of free and commercial add-ons is part of delivering a great product, but I can unequivocally say that we will invest in what we believe will benefit the most customers at any given time.

            Remember that JIRA is used by tens of thousands of companies, and each of them is using it in a different way, at a different scale, with a different set of priorities. JIRA's customizability and flexibility helps us support this, but at the same time it means that different customers perceive different features as "must-have" or "fundamental" as well as having vastly different perspectives on pricing. A feature that is critical for a small company that relies heavily on built-in JIRA reports may not register for a large enterprise that cares far more about JIRA's performance at scale.

            From an add-on developer's perspective, the type of features that fit the description "highly valued for a number of JIRA customers, but not a core feature in the product" is exactly the type of add-on you want to build. If your goal is to build an add-on for the largest available market, your goal as an add-on developer should be to build the most highly desired features that aren't part of the core product. But the existence of these add-ons does not cause us not to invest in these features. More often than not, we have already elected not to invest in certain features and this creates opportunities for add-on developers to fill.

            Obviously our priorities and needs as a product shift, and I can point to a number of features that we have introduced support for in the product that were previously filled by add-ons, like printing cards, a number of dashboard gadgets, importers, etc. Or we recognize that the demand from customers is so great that we need to invest in this with first-party support, as we have done with JIRA Service Desk and JIRA Portfolio.

            We absolutely recognize that add-ons can be expensive and cause problems with upgrades. But we trust our Marketplace and add-on vendors to find the right price for their products, and the reality is that there is no way every add-on in the Marketplace could be a native feature in JIRA, so once you accept that, every customer is going to have a different perspective on which add-ons should really be "native features" and which should be "add-ons." With regard to upgrades, we are doing our best to improve capabilities for add-on developers with features like entity properties.

            Regards,
            Dave Meyer
            JIRA Product Management

            Dave Meyer added a comment - Hi david.skreiner , I feel obligated to say that there is absolutely no such policy. Our only goal, as a product team, is to build the best product possible for as many customers as possible. Obviously, promoting a vibrant and healthy ecosystem of free and commercial add-ons is part of delivering a great product, but I can unequivocally say that we will invest in what we believe will benefit the most customers at any given time. Remember that JIRA is used by tens of thousands of companies, and each of them is using it in a different way, at a different scale, with a different set of priorities. JIRA's customizability and flexibility helps us support this, but at the same time it means that different customers perceive different features as "must-have" or "fundamental" as well as having vastly different perspectives on pricing. A feature that is critical for a small company that relies heavily on built-in JIRA reports may not register for a large enterprise that cares far more about JIRA's performance at scale. From an add-on developer's perspective, the type of features that fit the description "highly valued for a number of JIRA customers, but not a core feature in the product" is exactly the type of add-on you want to build. If your goal is to build an add-on for the largest available market, your goal as an add-on developer should be to build the most highly desired features that aren't part of the core product. But the existence of these add-ons does not cause us not to invest in these features. More often than not, we have already elected not to invest in certain features and this creates opportunities for add-on developers to fill. Obviously our priorities and needs as a product shift, and I can point to a number of features that we have introduced support for in the product that were previously filled by add-ons, like printing cards, a number of dashboard gadgets, importers, etc. Or we recognize that the demand from customers is so great that we need to invest in this with first-party support, as we have done with JIRA Service Desk and JIRA Portfolio. We absolutely recognize that add-ons can be expensive and cause problems with upgrades. But we trust our Marketplace and add-on vendors to find the right price for their products, and the reality is that there is no way every add-on in the Marketplace could be a native feature in JIRA, so once you accept that, every customer is going to have a different perspective on which add-ons should really be "native features" and which should be "add-ons." With regard to upgrades, we are doing our best to improve capabilities for add-on developers with features like entity properties. Regards, Dave Meyer JIRA Product Management

            Unfortunately plugins tend to be either expensive, or cause problems with upgrades. I've met JIRA users and even JIRA Administrator Course teachers who say it's your policy to not implement stuff if there's an expensive addon for it, and warn against using Atlassian products because of these hidden costs

            David Skreiner added a comment - Unfortunately plugins tend to be either expensive, or cause problems with upgrades. I've met JIRA users and even JIRA Administrator Course teachers who say it's your policy to not implement stuff if there's an expensive addon for it, and warn against using Atlassian products because of these hidden costs

            Dave Meyer added a comment -

            Hi everyone,

            Thanks for voting and commenting on this issue. Your feedback is key to helping us understand how you use JIRA so we can continue improving your experience. We have reviewed this issue over the last few days; unfortunately we don't have any plans to support this in JIRA for the foreseeable future.

            There are also a few add-ons on the Atlassian Marketplace that offer this feature if you're using JIRA Server (and several developers are looking at bringing this to JIRA Cloud also).

            Please remember that jira.atlassian.com is one of many inputs for the JIRA roadmap. You can learn more about our process here.

            I understand that our decision may be disappointing. Please don't hesitate to contact me if you have any questions.

            Regards,
            Dave Meyer
            dmeyer@atlassian.com
            Product Manager, JIRA Platform

            Dave Meyer added a comment - Hi everyone, Thanks for voting and commenting on this issue. Your feedback is key to helping us understand how you use JIRA so we can continue improving your experience. We have reviewed this issue over the last few days; unfortunately we don't have any plans to support this in JIRA for the foreseeable future. There are also a few add-ons on the Atlassian Marketplace that offer this feature if you're using JIRA Server (and several developers are looking at bringing this to JIRA Cloud also). Please remember that jira.atlassian.com is one of many inputs for the JIRA roadmap. You can learn more about our process here . I understand that our decision may be disappointing. Please don't hesitate to contact me if you have any questions. Regards, Dave Meyer dmeyer@atlassian.com Product Manager, JIRA Platform

            Pablo Beltran added a comment - - edited

            Yeap, but it will be supported soon

            IMHO, SQL for JIRA (Server) is a so much revolutionary add-on that Atlassian might review its policy for including 3rd party add-ons on JIRA Cloud. it would allow all the JIRA cloud users to connect immediately to their instances in a secure way via JDBC remotely and make really powerful reports, extract data, etc and overcome almost all the JQL limitations and provide a truly standard alternative for reporting. Unfortunately, it will not happen ever .

            The drawback of a native add-on for Cloud (built upon the Connect framework) is the performance because all the data must be fetched by using remote REST/JSON services...

            Pablo Beltran added a comment - - edited Yeap, but it will be supported soon IMHO, SQL for JIRA (Server) is a so much revolutionary add-on that Atlassian might review its policy for including 3rd party add-ons on JIRA Cloud. it would allow all the JIRA cloud users to connect immediately to their instances in a secure way via JDBC remotely and make really powerful reports, extract data, etc and overcome almost all the JQL limitations and provide a truly standard alternative for reporting. Unfortunately, it will not happen ever . The drawback of a native add-on for Cloud (built upon the Connect framework) is the performance because all the data must be fetched by using remote REST/JSON services...

            SQL for JIRA is not supported OnDemand so I cannot use it

            Sigbjørn Rivelsrud added a comment - SQL for JIRA is not supported OnDemand so I cannot use it

            Pablo Beltran added a comment - - edited

            SQL for JIRA supports it in a very easy and flexible way:

            issue in sql("
            select i.key, count
            from issues i inner join issuelinks l on l.issueid = i.id
            where i.jql='project=MYPROJECT' and l.type='Blocks' group by i.key
            having count > 0
            ")

            You have to change the l.type='Blocks' condition in the where clause to meet your link type needs as well as you may also want to set a different threshold in the having count > 0 clause to query for issues with more than N links of type X, for instance.

            NOTE: SQL for JIRA is a revolutionary add-on which brings all the features and benefits of SQL to JQL so you can extend JQL with SQL or even SQL with JQL (bi-directional integration is supported). As it is pure standard SQL solution you can also run JQL reports via JDBC remotely and integrate them to your corporate Java applications or industry-standard reporting tools commercial and free like Pentaho, BIRT, jasperReports, etc,

            Hope this helps

            Pablo Beltran added a comment - - edited SQL for JIRA supports it in a very easy and flexible way: issue in sql(" select i.key, count from issues i inner join issuelinks l on l.issueid = i.id where i.jql='project=MYPROJECT' and l.type='Blocks' group by i.key having count > 0 ") You have to change the l.type='Blocks' condition in the where clause to meet your link type needs as well as you may also want to set a different threshold in the having count > 0 clause to query for issues with more than N links of type X, for instance. NOTE: SQL for JIRA is a revolutionary add-on which brings all the features and benefits of SQL to JQL so you can extend JQL with SQL or even SQL with JQL (bi-directional integration is supported). As it is pure standard SQL solution you can also run JQL reports via JDBC remotely and integrate them to your corporate Java applications or industry-standard reporting tools commercial and free like Pentaho, BIRT, jasperReports, etc, Hope this helps

            boleary added a comment - - edited

            The usefulness of this cannot be overstated. Go for it!

            boleary added a comment - - edited The usefulness of this cannot be overstated. Go for it!

            What does it meen that it moved to the verified status? Do you plan to fix the issue now?

            Sigbjørn Rivelsrud added a comment - What does it meen that it moved to the verified status? Do you plan to fix the issue now?

            JIRA Admin added a comment -

            Thanks Alot, Keiei Tanto. Its really of good help.

            JIRA Admin added a comment - Thanks Alot, Keiei Tanto. Its really of good help.

            Keiei Tanto [Vivid] added a comment - - edited

            If you are open to using an add-on, we have designed Vivid Trace to categorically solve such situations. The following JQL queries address each of your examples and will make a good starting point for fine-tuning.

            1. To find all issues that are duplicates of issue JRA-25640 (one direction, issue specified):
            issue IN relations(JRA-25640, "issuelinktype = duplicates", "direction = inward")
            Adjust direction to suit your circumstances.

            2. To find all issues that are blocking issue JRA-25640 or that JRA-25640 blocks (bidirectional, issue specified):
            issue IN relations(JRA-25640, "issuelinktype = blocks", "direction in (inward, outward)")
            Or use the equivalent "sugar" JQL function to make the query more concise:
            issue IN links(JRA-25640, "issuelinktype = blocks")

            3. To find all issues that are duplicates of any issue, or which duplicate any issue (bidirectional, no issue specified):
            issue IN relations("issuelinktype = duplicate")
            Note: This scans all issues that the signed-in user has permission to browse.

            4. To find all issues that are blocked (one direction, no issue specified):
            issue IN relations("issuelinktype = blocks", "direction = inward")
            Note: Setting the direction to both inward and outward will give the same results. This is because any issue that has a blocking relationship in one direction necessarily connotes that there is a corresponding issue on the other end of the relationship. The following is equivalent:
            issue IN links("issuelinktype = blocks")

            In compliance with your implementation notes, the existing JQL function(s) continue to work exactly as-is; Vivid Trace introduces a new suite of functions. Their names have been deliberately chosen to avoid conflicts to a reasonable degree. The relations() suite of JQL functions have vararg behavior, and don't inflict upon you the need to memorize nasty parameter orderings. The queries are designed to be performant as long as your Lucene index is fully within the JVM's memory (more info). Vivid Trace brings the missing JQL function plumbing. Full product documentation here.

            BTW, this issue along with JRA-2544 served as a motivation & benchmark for the design of the JQL functions. We kept you in mind the whole time.

            (Edited to link product)

            Keiei Tanto [Vivid] added a comment - - edited If you are open to using an add-on, we have designed Vivid Trace to categorically solve such situations. The following JQL queries address each of your examples and will make a good starting point for fine-tuning. 1. To find all issues that are duplicates of issue JRA-25640 (one direction, issue specified): issue IN relations( JRA-25640 , "issuelinktype = duplicates", "direction = inward") Adjust direction to suit your circumstances. 2. To find all issues that are blocking issue JRA-25640 or that JRA-25640 blocks (bidirectional, issue specified): issue IN relations( JRA-25640 , "issuelinktype = blocks", "direction in (inward, outward)") Or use the equivalent "sugar" JQL function to make the query more concise: issue IN links( JRA-25640 , "issuelinktype = blocks") 3. To find all issues that are duplicates of any issue, or which duplicate any issue (bidirectional, no issue specified): issue IN relations("issuelinktype = duplicate") Note: This scans all issues that the signed-in user has permission to browse. 4. To find all issues that are blocked (one direction, no issue specified): issue IN relations("issuelinktype = blocks", "direction = inward") Note: Setting the direction to both inward and outward will give the same results. This is because any issue that has a blocking relationship in one direction necessarily connotes that there is a corresponding issue on the other end of the relationship. The following is equivalent: issue IN links("issuelinktype = blocks") In compliance with your implementation notes, the existing JQL function(s) continue to work exactly as-is; Vivid Trace introduces a new suite of functions. Their names have been deliberately chosen to avoid conflicts to a reasonable degree. The relations() suite of JQL functions have vararg behavior, and don't inflict upon you the need to memorize nasty parameter orderings. The queries are designed to be performant as long as your Lucene index is fully within the JVM's memory ( more info ). Vivid Trace brings the missing JQL function plumbing. Full product documentation here . BTW, this issue along with JRA-2544 served as a motivation & benchmark for the design of the JQL functions. We kept you in mind the whole time. (Edited to link product)

            I agree its really weird this is not yet in place.

            Sigbjørn Rivelsrud added a comment - I agree its really weird this is not yet in place.

            lade added a comment -

            Actually, this is well over 3 years and its appalling that this functionality still does not exist in JIRA. taking into account the fact that there are plug-ins out there that meet this requirement. This is a MUST have requirement as it provides effective jira management.

            lade added a comment - Actually, this is well over 3 years and its appalling that this functionality still does not exist in JIRA. taking into account the fact that there are plug-ins out there that meet this requirement. This is a MUST have requirement as it provides effective jira management.

            Garry May added a comment -

            Seriously...we're coming up on 3 years of talking about this...

            Developing a Function for Server installs is pretty easy, building one for Cloud is impossible. Surely Atlassian can spare 1 Dev for 1 day to have a red hot crack at implementing this functionality, if not, perhaps they could work with Jamie Echlin (Script Runner) or Jobin Kuruvilla (jTricks) and integrate their products - thus saving a whole swag of time and avoiding further issues of this nature by future-proofing with this/these extensible development kits and library's.

            Thanks in advance guys!

            Garry May added a comment - Seriously...we're coming up on 3 years of talking about this... Developing a Function for Server installs is pretty easy, building one for Cloud is impossible. Surely Atlassian can spare 1 Dev for 1 day to have a red hot crack at implementing this functionality, if not, perhaps they could work with Jamie Echlin (Script Runner) or Jobin Kuruvilla (jTricks) and integrate their products - thus saving a whole swag of time and avoiding further issues of this nature by future-proofing with this/these extensible development kits and library's. Thanks in advance guys!

            Hi!

            I'm working on the Add-On for Jira Cloud, that contains different workarounds for missing JQL features.
            One of them is a function that you are looking for:

            • linkType(linkType) - Find issues by link. Returns both directions (e.g. "is blocked" and "blocks" for "Blocker" link)

            Since there is no way so far to integrate Atlassian Connect Add-On to the native search, JQL Pro simply returns a list of found keys, so you can put them to the native search and proceed with your own needs.

            https://marketplace.atlassian.com/plugins/jql-pro

            If you have any other needs, feel free either to drop me an email or log a ticket in our tracker

            Vitalii Zurian {Appfire} added a comment - Hi! I'm working on the Add-On for Jira Cloud, that contains different workarounds for missing JQL features. One of them is a function that you are looking for: linkType(linkType) - Find issues by link. Returns both directions (e.g. "is blocked" and "blocks" for "Blocker" link) Since there is no way so far to integrate Atlassian Connect Add-On to the native search, JQL Pro simply returns a list of found keys, so you can put them to the native search and proceed with your own needs. https://marketplace.atlassian.com/plugins/jql-pro If you have any other needs, feel free either to drop me an email or log a ticket in our tracker

            This would be great for planning and showing dependencies. It would be great to also have access to the confluence pages (mentioned in). It seems that this feature is half complete. Being able to search by this info is extremely useful, and then being able to report on it is also huge.

            Aaron Barker added a comment - This would be great for planning and showing dependencies. It would be great to also have access to the confluence pages (mentioned in). It seems that this feature is half complete. Being able to search by this info is extremely useful, and then being able to report on it is also huge.

            I am using Jira Server and would like to be able to filter out issues that are blocked by an open issue and this seems like the place to go about adding my two cents

            Ryan Knight added a comment - I am using Jira Server and would like to be able to filter out issues that are blocked by an open issue and this seems like the place to go about adding my two cents

            Scott Dennison added a comment - - edited

            This be a must have.

            Scott Dennison added a comment - - edited This be a must have.

            What is the best way to track blocked tickets in the system without this feature? Add a custom field? Why would it be easier to search a custom field than something that is already built into the product? Please add this! We are using the OnDemand version of JIRA and there don't appear to be any add-ons available in the marketplace for OnDemand.

            Jason Schmitt added a comment - What is the best way to track blocked tickets in the system without this feature? Add a custom field? Why would it be easier to search a custom field than something that is already built into the product? Please add this! We are using the OnDemand version of JIRA and there don't appear to be any add-ons available in the marketplace for OnDemand.

            This limitation in OnDemand is really a pain. I would really like to use link dependancies to help my team prioritize. Please elevate the priority of this feature!

            Jonathan Gamble added a comment - This limitation in OnDemand is really a pain. I would really like to use link dependancies to help my team prioritize. Please elevate the priority of this feature!

            Hi, we are also looking for this - and we are using OnDemand, so no way to use an add-on.

            Chris Atlas added a comment - Hi, we are also looking for this - and we are using OnDemand, so no way to use an add-on.

            Hey Nicholas,
            Thanks for the suggestion. This may work for those users who have their own installations of Jira. The add-in doesn't support the OnDemand version which is what many of us are running, though. Hopefully, with the upcoming changes to the platform to unify the add-in model, this might be something to consider in the future.

            Cheers,
            Russell Sinclair, Animoto

            Russell Sinclair added a comment - Hey Nicholas, Thanks for the suggestion. This may work for those users who have their own installations of Jira. The add-in doesn't support the OnDemand version which is what many of us are running, though. Hopefully, with the upcoming changes to the platform to unify the add-in model, this might be something to consider in the future. Cheers, Russell Sinclair, Animoto

            G'day folks,

            It is possible to write JQL that shows issues linked to another with a specific link type. You can do this with an add-on called Script Runner that is available via the Marketplace for Download versions of JIRA. At Twitter we use Script Runner to visualise epic dependencies with the following JQL: issueFunction in linkedIssuesOf(“project = XYZ and issuetype = Epic and fixVersion = \”2013-Q2\”", blocks)

            It works like a charm. If you are interested in learning more about how we use it have a read of Using the Epic Workflow in GreenHopper and Visualising Epics and Dependencies in JIRA with GreenHopper.

            Jamie, the author of Script Runner, has done a superb job keeping it up to date alongside the latest JIRA versions. Jamie, thank you very much - you are a champion!

            Cheers folks,
            Nicholas Muldoon

            Nicholas Muldoon added a comment - G'day folks, It is possible to write JQL that shows issues linked to another with a specific link type. You can do this with an add-on called Script Runner that is available via the Marketplace for Download versions of JIRA. At Twitter we use Script Runner to visualise epic dependencies with the following JQL: issueFunction in linkedIssuesOf(“project = XYZ and issuetype = Epic and fixVersion = \”2013-Q2\”", blocks) It works like a charm. If you are interested in learning more about how we use it have a read of Using the Epic Workflow in GreenHopper and Visualising Epics and Dependencies in JIRA with GreenHopper . Jamie, the author of Script Runner, has done a superb job keeping it up to date alongside the latest JIRA versions. Jamie, thank you very much - you are a champion! Cheers folks, Nicholas Muldoon

            I would appreciate this feature.
            It´s hard motivating people to save their data in a sematic way if they can´t find it afterwards.

            Matthias Hößl added a comment - I would appreciate this feature. It´s hard motivating people to save their data in a sematic way if they can´t find it afterwards.

            needs that as well.
            searching for linking issue is really a pain and we can't find any workaround on ondemand

            Fabrizio Galletti added a comment - needs that as well. searching for linking issue is really a pain and we can't find any workaround on ondemand

            Hi I also need to create a query that would select the following:

            filter the return based on the linkedIssues of the parent - similar to the following select logic:
            project in (PROJX, PROJY, PWC, IT, ANERDS, REDFROG) AND hasLinks = ("where Project not in ANERDS, PWC").

            We are unable to get plugins so I have to rely what is available in the basic package.

            DeniseThompson397 added a comment - Hi I also need to create a query that would select the following: filter the return based on the linkedIssues of the parent - similar to the following select logic: project in (PROJX, PROJY, PWC, IT, ANERDS, REDFROG) AND hasLinks = ("where Project not in ANERDS, PWC"). We are unable to get plugins so I have to rely what is available in the basic package.

            This would be a useful feature for us as well.

            Scott Carpenter added a comment - This would be a useful feature for us as well.

            Oliver added a comment -

            Added a vote to this - being able to filter for open issues which are linked as blocking any other ticket, or filtering for issues issues which are blocked by an open ticket is something which would be massively beneficial for our workflow.

            Using plugins is not an option so we currently use a horrible system involving labels to work around this.

            Oliver added a comment - Added a vote to this - being able to filter for open issues which are linked as blocking any other ticket, or filtering for issues issues which are blocked by an open ticket is something which would be massively beneficial for our workflow. Using plugins is not an option so we currently use a horrible system involving labels to work around this.

            JamieA added a comment - - edited

            Most of this is also possible with the jql functions module in the script runner plugin. Sorry, yet another plugin.

            However, the implementation is completely different from the other two mentioned, which in my opinion do not scale well. Functions like hasAttachments, hasComments, and hasLinks("blocks") all happen in O(1) time. I have tested on live instances with half a million issues and all execute in less than half a second.

            linkedIssuesOf / parentsOf / subtasksOf happen in O(N) time, but even on a a huge instance take a few seconds when operating across every issue. They all provide a subquery argument to restrict to just your projects if you need to.

            issueFunction in linkedIssuesOf("resolution is empty", "duplicates")

            takes under 100ms.

            Docs: https://studio.plugins.atlassian.com/wiki/display/GRV/Scripted+JQL+Functions

            JamieA added a comment - - edited Most of this is also possible with the jql functions module in the script runner plugin. Sorry, yet another plugin. However, the implementation is completely different from the other two mentioned, which in my opinion do not scale well. Functions like hasAttachments, hasComments, and hasLinks("blocks") all happen in O(1) time. I have tested on live instances with half a million issues and all execute in less than half a second. linkedIssuesOf / parentsOf / subtasksOf happen in O(N) time, but even on a a huge instance take a few seconds when operating across every issue. They all provide a subquery argument to restrict to just your projects if you need to. issueFunction in linkedIssuesOf( "resolution is empty" , "duplicates" ) takes under 100ms. Docs: https://studio.plugins.atlassian.com/wiki/display/GRV/Scripted+JQL+Functions

            EddieW added a comment -

            This would be great. Using the custom craftforge JQL plugin, but the performance impact to the board is dramatic

            EddieW added a comment - This would be great. Using the custom craftforge JQL plugin, but the performance impact to the board is dramatic

            AlexanderR added a comment -

            Perhaps this plugin might help:
            https://marketplace.atlassian.com/plugins/org.craftforge.jira.craftforge-jql-functions-plugin

            You can do queries like the following which will show you for a project "myProject" all unresolved linked issues of the type "Blocks" (direction inward) linking to an unresolved issue of your project:

            project != myProject and resolution is EMPTY and 
            linkedIssuesFromQuery("project = myProject and resolution is EMPTY", "Blocks", "inward")
            

            This way you can see all impediments from outside your project.

            AlexanderR added a comment - Perhaps this plugin might help: https://marketplace.atlassian.com/plugins/org.craftforge.jira.craftforge-jql-functions-plugin You can do queries like the following which will show you for a project "myProject" all unresolved linked issues of the type "Blocks" (direction inward) linking to an unresolved issue of your project: project != myProject and resolution is EMPTY and linkedIssuesFromQuery( "project = myProject and resolution is EMPTY" , "Blocks" , "inward" ) This way you can see all impediments from outside your project.

            Need this feature asap so the team can see that stories are blocked due to bugs.

            Ana Henneberke added a comment - Need this feature asap so the team can see that stories are blocked due to bugs.

            Vikas Jain added a comment -

            linkedIssues(issueKey,linkType)

            I tried using linkedIssues() function without providing the issuekey but just the linktype as it is mentioned that we can optionally restrict the search to links of a particular type(https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-linkedIssues). This does not work. I have to provide the issuekey. This does not help me at all.

            Waiting for this feature to be available soon.

            Vikas Jain added a comment - linkedIssues(issueKey,linkType) I tried using linkedIssues() function without providing the issuekey but just the linktype as it is mentioned that we can optionally restrict the search to links of a particular type( https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-linkedIssues ). This does not work. I have to provide the issuekey. This does not help me at all. Waiting for this feature to be available soon.

            okev added a comment -

            +1 for AOD. Or fix the AOD plugin problem...

            okev added a comment - +1 for AOD. Or fix the AOD plugin problem...

            Is this being addressed at all? We use OnDemand and for project planning and proper tasking this is a critical need, which we cannot use JQL Tricks for.

            Patrick Driggett added a comment - Is this being addressed at all? We use OnDemand and for project planning and proper tasking this is a critical need, which we cannot use JQL Tricks for.

            ZachE added a comment -

            We're using the JQL Tricks plugin to do this and it is great. There are no performance issues if you use the linkedIssuesInQuery() function as long as the subquery that you pass to the function doesn't have a huge number of hits. You can get really precise results using the various sub-query functions that JQL Tricks provides. This plugin makes me love JIRA again.

            https://marketplace.atlassian.com/31399

            ZachE added a comment - We're using the JQL Tricks plugin to do this and it is great. There are no performance issues if you use the linkedIssuesInQuery() function as long as the subquery that you pass to the function doesn't have a huge number of hits. You can get really precise results using the various sub-query functions that JQL Tricks provides. This plugin makes me love JIRA again. https://marketplace.atlassian.com/31399

            Hi Chris, is there any update on this issue?

            Rafael Harispe added a comment - Hi Chris, is there any update on this issue?

            Hi Chris,
            is there a plan already when this feature will be available?
            Thanks, Christine

            Christine Meyer added a comment - Hi Chris, is there a plan already when this feature will be available? Thanks, Christine

            Rafael,

            Right now, this issue is unresolved (see the "Resolution" field), the functionality hasn't been implemented or released.

            regards,

            Chris.

            Chris Mountford added a comment - Rafael, Right now, this issue is unresolved (see the "Resolution" field), the functionality hasn't been implemented or released. regards, Chris.

            Sorry, but it is now released this functionality? why you say, now that we
            indexed the links?
            I have a OnDemand version of jira, and I can't add plugins.

            El 28 de marzo de 2012 01:57, Chris Mountford [Atlassian] (JIRA) <

            Rafael Harispe added a comment - Sorry, but it is now released this functionality? why you say, now that we indexed the links? I have a OnDemand version of jira, and I can't add plugins. El 28 de marzo de 2012 01:57, Chris Mountford [Atlassian] (JIRA) <

            The reason JQL Tricks is resource intensive is because it probably calculates the link logic by doing database queries, like the existing link function. Now that we index the links, the JQL function and the JQL Tricks plugin can both be expanded in functionality and/or dramatically improved in performance by using the index rather than the database.

            Chris Mountford added a comment - The reason JQL Tricks is resource intensive is because it probably calculates the link logic by doing database queries, like the existing link function. Now that we index the links, the JQL function and the JQL Tricks plugin can both be expanded in functionality and/or dramatically improved in performance by using the index rather than the database.

            We use JQL Tricks and while it's extremely powerful, it can be quite resource-intensive with some of its functions.
            We've got a 400,000+ Jira instance, so we're probably not the intended customer.
            Nevertheless, the plugin did cause a few OutOfMemory or GCLimitOverhead errors, even on a system configured with a 12G heap.

            In the event it helps others, here's the results of our testing each function:

            Function Fit for Use Notes
            groupsOfUser([user])
            groupMatches(regex)
            hasAttachments([Count],[Operator]) Too Many Clauses
            hasWatchers([Count],[Operator],[User]) GC Overhead Limit Reached
            resolvedByUser([User]) Results were returned, but search took extremely long time
            movedToStatusByUser(Status, [User]) GC Overhead Limit Reached
            hasSameValues(Field1, Field2, [Field3] .. [Field n])
            commentedByUser([User])
            commentedOnDate(date)
            attachedByUser([User])
            hasNumberValue(Field, Operator, Value) Initial search was slow, but subsequent searches were instant
            componentsFromProject(Project)
            linkedAllIssues(issueKey,[linkType]) Too many clauses
            linkedIssuesByDepth(issueKey,depth,[linkType]) Disabling as it's a variant on the function above
            hasLinks([linkType]) Already disabled
            unlinkedIssues([linkType]) Disabled as it's a derivative of the function above
            linkedIssuesInProject(project,[linkType])
            linkedIssuesInVersion(versionId,[linkType])
            linkedIssuesInVersionByName(versionName,[linkType]) Results took 20-30 seconds to return, which is borderline acceptable
            linkedIssuesInComponent(componentId,[linkType])
            linkedIssuesInComponentByName(project, componentName,[linkType])
            linkedIssuesHasStatus (status1, status2, .., statusN, [linkType]) Caused by: java.lang.OutOfMemoryError: Java heap space
            recentProjects()
            projectWithUserInRole(role,[user])
            parent(JqlQuery) Caused by: java.lang.OutOfMemoryError: Java heap space
            subtask(JqlQuery) GC Overhead Limit Reached
            hasSubtasks([subtaskType]) NullPointerException
            hasSubtaskAssignedTo([User])
            hasParentAssignedTo([User])
            hasSubtaskStatus(status) This method is discontinued from v3.0. Use subtask function instead!
            hasParentStatus(status) This method is discontinued from v3.0. Use parent function instead!
            membersOfGroups(group1,group2,..,groupN)
            projectLeads()
            projectLead(project)
            usersInRole(project,role)
            userMatches(regex)
            dueVersions([Project])
            currentVersionsBySeq([Project])
            currentVersionsByDate([Project])
            versionsAfterDate(date)
            releasedOn(date)
            versionsAfter(versionId)
            versionsBefore(versionId)
            workStartedOn(date,[User])
            workLoggedOn(date,[User])
            workUpdatedOn(date,[User])
            workLoggedBetween(startDate,endDate,[User]) DB Dependent, query ran for a minute or so

            This was a result of testing on Jira 4.3.4 with the latest 4.3 compatible JQL Tricks version.
            We've yet to repeat the tests for Jira 4.4/5.0 with the newer JQL Tricks function.
            I know that one JQL issues was fixed by Atlassian in 4.4.5 which should help the performance issue.

            David Corley added a comment - We use JQL Tricks and while it's extremely powerful, it can be quite resource-intensive with some of its functions. We've got a 400,000+ Jira instance, so we're probably not the intended customer. Nevertheless, the plugin did cause a few OutOfMemory or GCLimitOverhead errors, even on a system configured with a 12G heap. In the event it helps others, here's the results of our testing each function: Function Fit for Use Notes groupsOfUser( [user] ) groupMatches(regex) hasAttachments( [Count] , [Operator] ) Too Many Clauses hasWatchers( [Count] , [Operator] , [User] ) GC Overhead Limit Reached resolvedByUser( [User] ) Results were returned, but search took extremely long time movedToStatusByUser(Status, [User] ) GC Overhead Limit Reached hasSameValues(Field1, Field2, [Field3] .. [Field n] ) commentedByUser( [User] ) commentedOnDate(date) attachedByUser( [User] ) hasNumberValue(Field, Operator, Value) Initial search was slow, but subsequent searches were instant componentsFromProject(Project) linkedAllIssues(issueKey, [linkType] ) Too many clauses linkedIssuesByDepth(issueKey,depth, [linkType] ) Disabling as it's a variant on the function above hasLinks( [linkType] ) Already disabled unlinkedIssues( [linkType] ) Disabled as it's a derivative of the function above linkedIssuesInProject(project, [linkType] ) linkedIssuesInVersion(versionId, [linkType] ) linkedIssuesInVersionByName(versionName, [linkType] ) Results took 20-30 seconds to return, which is borderline acceptable linkedIssuesInComponent(componentId, [linkType] ) linkedIssuesInComponentByName(project, componentName, [linkType] ) linkedIssuesHasStatus (status1, status2, .., statusN, [linkType] ) Caused by: java.lang.OutOfMemoryError: Java heap space recentProjects() projectWithUserInRole(role, [user] ) parent(JqlQuery) Caused by: java.lang.OutOfMemoryError: Java heap space subtask(JqlQuery) GC Overhead Limit Reached hasSubtasks( [subtaskType] ) NullPointerException hasSubtaskAssignedTo( [User] ) hasParentAssignedTo( [User] ) hasSubtaskStatus(status) This method is discontinued from v3.0. Use subtask function instead! hasParentStatus(status) This method is discontinued from v3.0. Use parent function instead! membersOfGroups(group1,group2,..,groupN) projectLeads() projectLead(project) usersInRole(project,role) userMatches(regex) dueVersions( [Project] ) currentVersionsBySeq( [Project] ) currentVersionsByDate( [Project] ) versionsAfterDate(date) releasedOn(date) versionsAfter(versionId) versionsBefore(versionId) workStartedOn(date, [User] ) workLoggedOn(date, [User] ) workUpdatedOn(date, [User] ) workLoggedBetween(startDate,endDate, [User] ) DB Dependent, query ran for a minute or so This was a result of testing on Jira 4.3.4 with the latest 4.3 compatible JQL Tricks version. We've yet to repeat the tests for Jira 4.4/5.0 with the newer JQL Tricks function. I know that one JQL issues was fixed by Atlassian in 4.4.5 which should help the performance issue.

            Dan Moore added a comment -

            Thanks Bryan - however, some of us are using the OnDemand solution.

            There is a ticket open to add JQL Tricks to the OnDemand hosted environment, so anyone who is interested, please vote on it: https://studio.atlassian.com/browse/JST-4710

            Dan Moore added a comment - Thanks Bryan - however, some of us are using the OnDemand solution. There is a ticket open to add JQL Tricks to the OnDemand hosted environment, so anyone who is interested, please vote on it: https://studio.atlassian.com/browse/JST-4710

            There's actually a plugin which provides a number of issue linking extensions to JQL, called JQL Tricks. You can find it here

            The list of functions it provides is below, which includes a "hasLinks" qualifier for JQL.

            Issue Links Functions

            • linkedAllIssues(issueKey,[linkType])
            • linkedIssuesByDepth(issueKey,depth,[linkType])
            • hasLinks([linkType])
            • linkedIssuesInProject(project,[linkType])
            • linkedIssuesInVersion(versionId,[linkType])
            • linkedIssuesInComponent(componentId,[linkType])
            • linkedIssuesHasStatus (status,[linkType])
            • linkedIssuesInVersionByName(versionName,[linkType])
            • linkedIssuesInComponentByName(projectName, componentName, [linkType])

            Bryan Rollins added a comment - There's actually a plugin which provides a number of issue linking extensions to JQL, called JQL Tricks. You can find it here The list of functions it provides is below, which includes a "hasLinks" qualifier for JQL. Issue Links Functions linkedAllIssues(issueKey, [linkType] ) linkedIssuesByDepth(issueKey,depth, [linkType] ) hasLinks( [linkType] ) linkedIssuesInProject(project, [linkType] ) linkedIssuesInVersion(versionId, [linkType] ) linkedIssuesInComponent(componentId, [linkType] ) linkedIssuesHasStatus (status, [linkType] ) linkedIssuesInVersionByName(versionName, [linkType] ) linkedIssuesInComponentByName(projectName, componentName, [linkType] )

            I need this feature urgently

            Christian Weinert added a comment - I need this feature urgently

            I also need this feature.

            Hieu Le Trung added a comment - I also need this feature.

            Bill Boyall added a comment - - edited

            We are using linking of issues extensively. I had assumed (always dangerous) that JIRA would have the ability to report on linked issues. Seems a basic requriement.

            Can anyone indicate when this feature will be available?

            Bill Boyall added a comment - - edited We are using linking of issues extensively. I had assumed (always dangerous) that JIRA would have the ability to report on linked issues. Seems a basic requriement. Can anyone indicate when this feature will be available?

            Hello Atlassian Dev Team,

            I need to create a query that select the following:

            more than one linkedIssues in more than one project - similar to the following select logic:
            project in (Pxxx100, Pxxx110, Pxxx111, Pxxx112, Pxxx113, Pxxx114, Pxxx115, ..., Pxxx124) AND hasLinks = ("relates to", "depends on").

            I am looking forward to see this statement in the standard JQL

            Thanks for considering the request in your roadmap.

            Christine Meyer added a comment - Hello Atlassian Dev Team, I need to create a query that select the following: more than one linkedIssues in more than one project - similar to the following select logic: project in (Pxxx100, Pxxx110, Pxxx111, Pxxx112, Pxxx113, Pxxx114, Pxxx115, ..., Pxxx124) AND hasLinks = ("relates to", "depends on"). I am looking forward to see this statement in the standard JQL Thanks for considering the request in your roadmap.

            Hi, I have been using Jira for several months to organize delivery on distributed software factories (Europe, Centro America and South America).
            Jira was very helpfully and powerfully tool for that, but definitively I think this is one of the most useful functionalities that is missing.
            It would be nice to have something like:
            > issue in linkedIssues(assignee = username, "testing discovered")
            > issue in linkedIssues(assignee in memberOf("team"), "testing discovered")
            > issue in linkedIssues(assignee in memberOf("team"), "is blocked by")
            > issue in linkedIssues(priority > Major, "is blocked by")

            Thanks for considering in your roadmap.

            Rafael Harispe added a comment - Hi, I have been using Jira for several months to organize delivery on distributed software factories (Europe, Centro America and South America). Jira was very helpfully and powerfully tool for that, but definitively I think this is one of the most useful functionalities that is missing. It would be nice to have something like: > issue in linkedIssues(assignee = username, "testing discovered") > issue in linkedIssues(assignee in memberOf("team"), "testing discovered") > issue in linkedIssues(assignee in memberOf("team"), "is blocked by") > issue in linkedIssues(priority > Major, "is blocked by") Thanks for considering in your roadmap.

            Agreed. This would be helpful as well for our company. We use a lot of issue linking, and it is often good to be able to create filters based on if an issue does or does not have a specific link type to another issue (the example given in the description of blockers comes to mind). Added my vote as well.

            Steven Ledford added a comment - Agreed. This would be helpful as well for our company. We use a lot of issue linking, and it is often good to be able to create filters based on if an issue does or does not have a specific link type to another issue (the example given in the description of blockers comes to mind). Added my vote as well.

            Y L Woo added a comment -

            Yes, I added my vote too. It'll be great to know/search how issues are linked to each other. For example: Project = ABC and links in (ABC-123, XYZ-1)

            More advanced would be to SHOW LINKS DEPTH = 3 will show relationships between projects, issues.

            Y L Woo added a comment - Yes, I added my vote too. It'll be great to know/search how issues are linked to each other. For example: Project = ABC and links in (ABC-123, XYZ-1) More advanced would be to SHOW LINKS DEPTH = 3 will show relationships between projects, issues.

            This feature would help us alot as we use Links extensively.

            Dominic Ricard added a comment - This feature would help us alot as we use Links extensively.

            Our enterprise looks forward to having this capability.

            adesso health solutions GmbH added a comment - Our enterprise looks forward to having this capability.

            Def consider this a priority for us.

            Gethin Liddell added a comment - Def consider this a priority for us.

            Our enterprise looks forward to having this capability.

            Ronald Horner added a comment - Our enterprise looks forward to having this capability.

            Also voted for this one as we use many liks between customers projects and internal projects

            Centile Atlassian added a comment - Also voted for this one as we use many liks between customers projects and internal projects

            Yogesh added a comment -

            Superimportant. This will make handling/queries so much easier.!.

            Yogesh added a comment - Superimportant. This will make handling/queries so much easier.!.

            Superimportant. This will make handling/queries so much easier.!.

            Goller, Wilfried added a comment - Superimportant. This will make handling/queries so much easier.!.

            Our team would definitely use this as well. Would be very helpful to increase search efficiency.

            Caitlin Marr added a comment - Our team would definitely use this as well. Would be very helpful to increase search efficiency.

            I could definitely use this! I want to see which issues are blocking others so I can prioritize those first.

            Noah Spitzer-Williams added a comment - I could definitely use this! I want to see which issues are blocking others so I can prioritize those first.

            I voted for the issue and I am happy to see that this feature will be implemented soon

            Emmanuel Rouillard added a comment - I voted for the issue and I am happy to see that this feature will be implemented soon

            Thanks for taking the time to comment Ellen, I agree with you this is a useful feature we should implement.

            While I can't promise it will be scheduled for a coming release, I have done the preliminary work to enable this function to be created, lowering the remaining work for this and related link features.

            I see you have voted for this issue. Be assured we will be considering it and will make our decision based on what the total impact across all our customers is, how much work needs to be performed and also what other work we are doing that is closely related.

            Chris Mountford added a comment - Thanks for taking the time to comment Ellen, I agree with you this is a useful feature we should implement. While I can't promise it will be scheduled for a coming release, I have done the preliminary work to enable this function to be created, lowering the remaining work for this and related link features. I see you have voted for this issue. Be assured we will be considering it and will make our decision based on what the total impact across all our customers is, how much work needs to be performed and also what other work we are doing that is closely related.

            Due to the limited reporting capabilities on issue links, issue linking really isn't as useful as it could be. We are hesitant to use links when we cannot generate good overviews and dashboards showing which issues have which kinds of links to which other issues. There are numerous cases where this would be eminently useful. Please address this issue.

            Ellen Daleng added a comment - Due to the limited reporting capabilities on issue links, issue linking really isn't as useful as it could be. We are hesitant to use links when we cannot generate good overviews and dashboards showing which issues have which kinds of links to which other issues. There are numerous cases where this would be eminently useful. Please address this issue.

              agniadzik Artur Gniadzik
              chris@atlassian.com Chris Mountford
              Votes:
              829 Vote for this issue
              Watchers:
              439 Start watching this issue

                Created:
                Updated:
                Resolved: