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

Remote Linking of Issues doesn't reindex issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 7.13.1, 7.6.11, 8.0.0
    • 7.4.0, 7.2.8, 7.3.3, 7.3.6, 7.5.2, 7.6.0, 7.13.0, 7.12.2, 7.6.10
    • Indexing
    • 7.02
    • 16
    • Severity 2 - Major
    • 34
    • 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

      Summary

      When linking a JIRA Issue to a remote link, such as a Confluence page, the JIRA issue is not reindexed

      Steps to Reproduce

      1. Re-index JIRA, ensuring that the Health Check shows the Lucene Index is healthy
      2. Add debug logging on com.atlassian.jira.issue.index 
      3. Insert a JIRA issues macro onto a new Confluence page (ensure that this is the first time that issue has been linked to that page)
      4. Refresh the support tools screen - the index shows as unhealthy.
        • The database has received an update from Confluence, but has not been reflected in the index
      5. Edit the issue that you linked, and it will be reindexed. Checking the support tools screen shows the lucene index is healthy again

      Additional Diagnostic Information

      Debug logging shows the following when an issue is edited and subsequently indexed:

      2017-07-05 10:55:53,554 http-nio-9733-exec-25 DEBUG admin 655x693x1 bmvmt3 0:0:0:0:0:0:0:1 /secure/AjaxIssueAction.jspa [c.a.j.issue.index.DefaultIssueIndexer] Performing an index operation: All issues provided by iterable will be specifically reloaded from the database before indexing
      2017-07-05 10:55:53,557 http-nio-9733-exec-25 DEBUG admin 655x693x1 bmvmt3 0:0:0:0:0:0:0:1 /secure/AjaxIssueAction.jspa [c.a.j.issue.index.DefaultIssueDocumentFactory] Indexing issue: TEST-11
      2017-07-05 10:55:53,575 http-nio-9733-exec-25 DEBUG admin 655x693x1 bmvmt3 0:0:0:0:0:0:0:1 /secure/AjaxIssueAction.jspa [c.a.j.issue.index.DefaultIndexManager] Reindexed 1 issues in 21ms.
      

      This debug logging does not appear for issues that have only been touched when updated via a remotelink. This behaviour can also be verified, by using Adaptavist ScriptRunner, which queries via the index:

      ScriptRunner can be used to validate the problem. Use the following JQL:

      issueFunction in linkedIssuesOfRemote("query", "pageId=xxx")

      In this JQL, xxx is a page ID in Confluence. It will show all the issues that have a remote link back to that page ID - but if the issue has not been updated in the index, it cannot be found via this function (or other index based functions).

      Issue Linking from Confluence can lead to issues where the database is up to date, but the Lucene index is not up to date, which makes searching and reporting on issues in JIRA unreliable. This will also affect all JQL queries based on the index - even viewing issues in issue navigator, ordered by updated date shows the issue hasn't been touched recently, when it actually has.

      This also occurs when you link an issue to a Confluence page from inside JIRA - the index is not updated in the same fashion. 

      Expected Results

      The issue is reindexed, as if it has been updated manually.

      Actual Results

      The issue is not reindexed, and the Lucene Health Check fails 

      Workaround

      Touch the issue to perform a reindex, or reindex JIRA.

              drauf Daniel Rauf
              dnorton@atlassian.com Dave Norton
              Votes:
              25 Vote for this issue
              Watchers:
              35 Start watching this issue

                Created:
                Updated:
                Resolved: