searchStream and TermsAggregation does not return stored values for Organizations, Team, and Parent Link custom fields

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 11.3.5
    • None
    • 11.03
    • 1
    • Severity 3 - Minor

      Issue Summary

      Implementing plugin integration with the Jira Search / Aggregate API (TermsAggregation and related aggregations) leads to error while performing aggregtion using custom field ID.

      Steps to Reproduce

      Attempt to use searchStream and/or TermsAggregation Api with customfield_id of field Team, Parent Link 

       

      DocumentSearchRequest request = DocumentSearchRequest.builder()
      .jqlQuery(jqlQuery)
      .fieldsToLoad(Set.of(
      DocumentConstants.ISSUE_ID,   // "issue_id"
      "customfield_11100"           // example: Organizations
      ))
      .build();SearchStreamResponse stream = issueDocumentSearchService.searchStream(request, user);
      stream.forEach(hit -> {
      Document doc = hit.getDocument();
      // Expect: doc.getFieldNames() includes "customfield_11100"
      // Expect: doc.getStrings("customfield_11100") returns org id string(s), e.g. ["42", "57"]
      }); 

       

      Expected Results

      Fields such as Team and parentlink should be available when using searcStream and aggresation API.

      Actual Results

       

      Field Team:
      "error": "Can't aggregate on 'customfield_11800' because the field does not exist. Make sure this field is indexed with the new 'com.atlassian.jira.search.issue.index.indexers.FieldIndexer'",Field Parent 
      Link
      "error": "Can't aggregate on 'customfield_11801' because the field does not exist. Make sure this field is indexed with the new 'com.atlassian.jira.search.issue.index.indexers.FieldIndexer'" 

      Workaround

      Organizations,Team & Parent link does have DocValues and supports aggregation however with the physical index field name

      "ISSUEPROP_jpo-issue-properties$team_id"

      "ISSUEPROP_jpo-issue-properties$parent_id"

              Assignee:
              Unassigned
              Reporter:
              Sandip Shrivastava
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: