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

Sorting by Text Field is not accurate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.6.4, 8.3.0, 7.13.5
    • Navigation - Search
    • None

      Issue Summary

      The sorting is not accurate after the 51st character for text fields.

      Steps to Reproduce

      1. Create a custom field of type Text Field (Single Line) (e.g. "Text Field CF")
      2. Create multiple issues and a sortable value for the custom field. The field value must be above 52 characters.
        For a quick way, use this to generate 99 issues
        for i in {01..99}; do curl -u <username>:<password> -X POST -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue/ \
        --data '{"fields": {"project":{"key": "<pkey>"},"summary": "Issue number '$i'","description": "test","issuetype": {"name": "<Type>"},"customfield_<id>" : "abc123abc123abc123abc123abc123abc123abc123abc123abc-1'$i'"}}'\
        ; done
        
      3. Search and sort by that field in the issue navigator. E.g.:
        "Text Field CF" is not EMPTY ORDER BY "Text Field CF" DESC
        

      Expected Results

      Issues would be correctly sorted independently of the number of characters in the field.

      Actual Results

      Jira only sorts up to the 51st character:

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

        1. 51chars.png
          51chars.png
          1.07 MB
        2. 52chars.png
          52chars.png
          1.06 MB
        3. 53chars.png
          53chars.png
          1.06 MB

            Unassigned Unassigned
            mfernandes@atlassian.com Matheus Fernandes
            Votes:
            10 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: