Time Since Chart gadget's issue navigator links are broken for datepicker custom 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
This article describes a scenario where navigator links are broken in the gadget Time Since Chart on JIRA Dashboards. This error is observed when Time Since Chart gadget is set with DatePicker field. Navigator links in this gadget when clicked, redirects to issue search page. However JQL is broken thus error is thrown in search page.

Environment
8.x, 9.x
Cause
It is a known product bug JRASERVER-26766 - Time Since Chart gadget issue navigator links are broken for date (day only fields)
Date value '2023-10-15 23:59' in JQL is invalid, it should just be date part not time i.e. '2023-10-15'.
Workaround
Following javascript should help resolve problem. User would have to set this javascript in announcement banner. This script is just replacing time 23:59 in navigator link with empty text.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<script> setTimeout(function() { AJS.toInit(function() { if (document.URL.indexOf("/secure/Dashboard.jspa") >= 0) { try { var chartframe = document.querySelectorAll('[title="Time Since Chart"]'); for (var j = 0, chartCount = chartframe.length; j < chartCount; j++) { var areas = chartframe[j].contentDocument.body.querySelectorAll("area[shape]"); for (var i = 0, len = areas.length; i < len; i++) { hreflink = areas[i].href.replace('+23%3A59', ''); areas[i].setAttribute('href', hreflink); } } } catch (error) {} } }); }, 2000); </script>
Was this helpful?