Details
-
Bug
-
Resolution: Fixed
-
Low
-
7.6.0
-
None
-
7.06
-
Severity 3 - Minor
-
Description
Issue Summary
Detailed view of issue search can break when it's initially loaded data has issue with summary containing any of characters not passing given regex:
/^(?:\{.*\}|\[.*\])$/
This includes (html encoded):
* 
 ("
")
* 
 ("
")
Environment
- Google Chrome
- Jira 7.13.0
Steps to Reproduce
1. Create issue with summary containing character
"
"
2. Go to
<Jira>/issues/?jql=reporter%20%3D%20currentUser()%20ORDER%20BY%20createdDate%20DESC
Expected Results
Issue search loads without any problems.
Actual Results
Issue search shows only site header and column with issues, while sidebar and issue view are blank white.
Javascript error can be seen in the console:
Uncaught TypeError: Cannot set property 'table' of undefined at Object.b [as readInitialData] (batch.js?agile_global_admin_condition=true&baseurl-check-resources=true&healthcheck-resources=true&is-server-instance=true&is-system-admin=true&jag=true&jaguser=true&jira.create.linked.issue=true&locale=en-PL&nps-acknowledged=true&nps-not-opted-out=true&richediton=true&spectrum=true&user-logged-in=true:6879) at HTMLDocument.<anonymous> (batch.js?agile_global_admin_condition=true&baseurl-check-resources=true&healthcheck-resources=true&is-server-instance=true&is-system-admin=true&jag=true&jaguser=true&jira.create.linked.issue=true&locale=en-PL&nps-acknowledged=true&nps-not-opted-out=true&richediton=true&spectrum=true&user-logged-in=true:8568) at j (batch.js?locale=en-PL&spectrum=true:66) at Object.fireWith (batch.js?locale=en-PL&spectrum=true:67) at Function.ready (batch.js?locale=en-PL&spectrum=true:55) at HTMLDocument.Q (batch.js?locale=en-PL&spectrum=true:65)
Notes
The problem exists because jQuery used in Jira 7 (1.7.2) doesn't parse JSON object when extracting it from DOM via .data() method if it doesn't pass the test on regexp mentioned above. Jira code relies on the object to be parsed and doesn't check if the parsing happened correctly.
Issue should be fixed in jQuery 1.8.1 and above: https://bugs.jquery.com/ticket/10863
Workaround
Use the site header to navigate to: Issues -> Current Search
Identified issues can be located via SQL; here's a PostgreSQL example for the two characters mentioned above:
SELECT p.pkey || '-' || ji.issuenum AS issue_key, ENCODE(ji.summary::bytea,'escape') AS issue_summary FROM jiraissue ji INNER JOIN project p ON ji.project = p.id WHERE ji.summary LIKE U&'%\2028%' OR ji.summary LIKE U&'%\2029%';
Attachments
Issue Links
- is resolved by
-
JRASERVER-43422 Update the jQuery version used in Jira for better compatibility
- Closed
- relates to
-
JRACLOUD-68680 Some characters in summary break saved filters
- Closed