java.lang.NumberFormatException: For input string: Error in Issue Navigator when Sorting by Calculated Field

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

When a sort is attempted in a calculated field (such as provided by the JIRA Misc Custom Fields Plugin), the Issue Navigator throws a stack trace.

The following appears in the atlassian-jira.log:

1 Arithemetic Exception in binary op

Diagnosis

To ensure this describes the error you're seeing, attempt to create a test project with a small number of issues, and ensure that for each issue the calculated field resolves to a valid value. Once that is confirmed, try the following JQL:

1 project = "Test Project" ORDER BY <customfieldid> ASC

If the search returns an Issue Navigator, then you have confirmed this bug.

Cause

This is caused by invalid values being inserted into the search index by the plugin.

Solution

Workaround

Workarounds include:

  • Remove offending plugin

  • Edit all affected issues to ensure that all calculations result in valid numeric values

  • Delete any non-conforming issues

Resolution

At this time, there is no resolution for this issue. JMCF-45 describes it in the JIRA Misc Custom Fields plugin. If you are running across this issue in association with that plugin, please Vote for that issue to increase its visibility to Development, or Watch this issue to remain appraised as it progresses through the development process.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.