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

CSV import allow future date cause index summary showing inconsistent data

      Issue Summary

      CSV import allows to import future dates for the issue updated date causing the http://<node-url>/rest/api/2/index/summary index summary endpoint to shows invalid lastUpdatedInIndex data:

      {
      nodeId: "jira-node1",
      reportTime: "2024-01-31T13:15:07.373+0000",
      issueIndex: {
      indexReadable: true,
      countInDatabase: 42,
      countInIndex: 42,
      countInArchive: 0,
      lastUpdatedInDatabase: "2024-01-31T12:55:27.654+0000",
      lastUpdatedInIndex: "2026-01-10T00:00:00.000+0000"
      },
      replicationQueues: {
      jira-node2: {
      lastConsumedOperation: {
      id: 10107,
      replicationTime: "2024-01-31T12:55:43.131+0000"
      },
      lastOperationInQueue: {
      id: 10107,
      replicationTime: "2024-01-31T12:55:43.131+0000"
      },
      queueSize: 0
      }
      }
      }
      

      With this behaviour, there is a possibility of causing the known issue below:

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Import new issues via CSV import using the following format:
        Summary, Assignee, Reporter, Issue Type, Description, Priority, Created, Updated
        "Test issue", admin, admin, 1,,,10/01/2026,10/01/2026
        
      2. Change the Date format to "dd/MM/yyyy"
      3. Proceed with the csv import. The latest issues shows the future issue updated date on the issue searching page:
      4. Run the rest/api/2/index/summary endpoint and we can see the lastUpdatedInIndex is showing future date:
        {
        nodeId: "jira-node1",
        reportTime: "2024-01-31T13:15:07.373+0000",
        issueIndex: {
        indexReadable: true,
        countInDatabase: 42,
        countInIndex: 42,
        countInArchive: 0,
        lastUpdatedInDatabase: "2024-01-31T12:55:27.654+0000",
        lastUpdatedInIndex: "2026-01-10T00:00:00.000+0000"
        },
        replicationQueues: {
        jira-node2: {
        lastConsumedOperation: {
        id: 10107,
        replicationTime: "2024-01-31T12:55:43.131+0000"
        },
        lastOperationInQueue: {
        id: 10107,
        replicationTime: "2024-01-31T12:55:43.131+0000"
        },
        queueSize: 0
        }
        }
        }
        

      Expected Results

      CSV import shouldn't be allowed to import the future date.

      Actual Results

      CSV import allows to import the future date and cause the inconsistent data showing in the lastUpdatedInIndex information from the rest/api/2/index/summary endpoint.

      Workaround

            [JRASERVER-77055] CSV import allow future date cause index summary showing inconsistent data

            There are no comments yet on this issue.

              Unassigned Unassigned
              ckimloong John Chin
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated: