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

Add Issue Ids in the log for message, 'Unable to index custom date field', generated during reindexing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 8.13.3
    • Indexing
    • None

      Problem Definition

      During reindexing, an 'Unable to index custom date field' message is logged when a custom date field for an issue has an invalid value, but the Id of the issue is not recorded.

      2012-06-25 23:30:58,073 IssueIndexer:thread-6 WARN admin 1406x194x2 1hi7f6 165.222.16.87,165.222.100.83 /secure/admin/IndexReIndex.jspa [index.indexers.impl.NumberCustomFieldIndexer] Unable to index custom date field 'Date of First Response(customfield_10267) with value: -61811600400000
      

      Logging the Id of the affected issue when this message gets generated would help save time correcting the invalid value.

      Suggested Solution

      Log affected Issue Ids for 'Unable to index custom date field' messages generated during reindexing operations.

      Workaround

      If there's only a single issue with an invalid value, the problematic issue can be found by utilizing a SQL query:

      select * from customfieldvalue where customfield={customFieldId} order by datevalue asc limit 1;
      

         Replace {customFieldId} with the Id of the custom date field logged in the WARN message
       
      Another workaround for finding the invalid value is detailed in Reindexing fails with Unable to index custom date field error in Jira server:

      To find the invalid date you must run the SQL query below in your database:

      select * from customfieldvalue where customfield = <CUSTOM_FIELD_ID> and datevalue < '1970-01-01';
      
       select issueid, created from jiraaction where actiontype='comment' and created < '1970-01-01';
      

       The <CUSTOM_FIELD_ID> in the above query can be found in the error code as part of the string: "customfield_10267"

            Unassigned Unassigned
            70a1e6433e4a Orlando (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: