Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Unresolved
-
Xray DC 8.4.6
-
None
-
Jira Version:
10.3.22App Version:
8.4.6-j10
Description
The Version filter on the Test Coverage (Requirement Coverage) panel of a Requirement issue calls /rest/raven/1.0/searchVersion/projectFixVersions to search Fix Versions. That endpoint builds a single SQL query with one bind parameter per project in scope:
SELECT DISTINCT V.VNAME FROM PROJECTVERSION V WHERE LOWER(V.VNAME) LIKE :search || '%' AND V.PROJECT IN (<projects>) ORDER BY V.VNAME
On Oracle databases, an IN list is limited to 1000 expressions. When the number of projects passed into this query exceeds that limit, Oracle rejects the statement with ORA-01795: maximum number of expressions in a list is 1000, and the request fails every time. The Version filter becomes completely unusable on any instance where this project count is exceeded. This is the same class of defect previously fixed in XRAY-8099 and XRAY-7389 for other unchunked IN clauses, just not this code path (com.xpandit.raven.repository.ProjectsVersionRepositoryImpl).
Pre-conditions
- Xray Data Center running on an Oracle database.
- The Jira instance (or the set of projects visible to the requesting user, pending confirmation above) has more than 1000 projects.
How to reproduce
- On an Oracle backed Xray Data Center instance with more than 1000 projects, open any Requirement type issue.
- Go to the Test Coverage panel (with Requirement Coverage enabled).
- Open the Version filter and enter a search term (or just open the dropdown, depending on how the search is triggered).
- Observe the request to /rest/raven/1.0/searchVersion/projectFixVersions fails.
Actual result/Attachments
The user sees Jira's generic AJAX error dialog: "The Jira server was contacted but has returned an error response. We are unsure of the result of this operation." No Fix Versions are returned and the Version filter cannot be used. Server side, every call to the endpoint throws:
org.jdbi.v3.core.statement.UnableToExecuteStatementException: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
[statement: SELECT DISTINCT V.VNAME FROM PROJECTVERSION V WHERE LOWER(V.VNAME) LIKE :search || '%' AND V.PROJECT IN (<projects>) ORDER BY V.VNAME]
Stack trace runs through com.xpandit.raven.repository.ProjectsVersionRepositoryImpl and com.xpandit.raven.rest.internal.h. Reproduced consistently: 52 out of 52 calls failed the same way in the customer log over a six minute window (log attached from SUPPORT-121517). A screenshot of the client side dialog is attached (hostname cropped for customer privacy).
Expected result
The Version filter should return matching Fix Versions successfully regardless of how many projects exist in scope, by chunking the project IN clause into batches under the Oracle 1000 element limit (or an equivalent fix), consistent with how XRAY-8099 and XRAY-7389 addressed similar IN clause limits elsewhere.
Version
- Jira: 10.3.22
- Xray: 8.4.6-j10 (App Version)
- Hosting: Data Center
- Database: Oracle
Attachments
Issue Links
- duplicates
-
XDC-1245 Loading...