Excerpt | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
JIRA 7 bug
Broken portlets can be fixed individually by editing them and setting However only the dashboard owner can do this, and it's not exactly intuitive. This page describes an ugly, painful process whereby a luckless JIRA administrator can identify broken portlets, log in as each affected user and fix them. It requires root access to the JIRA installation, and the ability to run SQL against the JIRA database. |
...
The bug affects portlet that have a user preference of isCumulative = true
but don't have the preference newly introduced
. So we could identify affected dashboards with the SQL (mysql operation
= cumulative parameterCONCAT
function used to join strings):
Code Block | ||||
---|---|---|---|---|
| ||||
SELECT concat('https://jira.example.com/secure/Dashboard.jspa?selectPageId=', portalpage.id)
FROM portalpage
JOIN portletconfiguration ON portalpage.id=portletconfiguration.portalpage
JOIN gadgetuserpreference ON portletconfiguration.id=gadgetuserpreference.portletconfiguration
WHERE gadgetuserpreference.userprefkey='isCumulative' AND gadgetuserpreference.userprefvalue='true'
AND NOT EXISTS (SELECT * FROM gadgetuserpreference g WHERE g.portletconfiguration=portletconfiguration.id AND userprefkey='operation' AND userprefvalue='cumulative') ; |
This gives one a list of URLs of problematic dashboards:
...
Code Block | ||||
---|---|---|---|---|
| ||||
SELECT distinct concat('https://jira.example.com/user.jsp?lastPage=/secure/Dashboard.jspa?selectPageId=', portalpage.id, '&user=', app_user.lower_user_name)
FROM gadgetuserpreference g JOIN portletconfiguration p ON g.PORTLETCONFIGURATION = p.ID
JOIN portalpage on p.portalpage=portalpage.id
JOIN cwd_user ON portalpage.username=cwd_user.user_name
JOIN app_user ON cwd_user.user_name=app_user.user_key
WHERE p.GADGET_XML like '%createdvsresolved-gadget.xml' AND g.USERPREFKEY='isCumulative' AND g.USERPREFVALUE='true'
AND NOT EXISTS (select * from gadgetuserpreference WHERE portletconfiguration=p.ID AND USERPREFKEY='operation' AND USERPREFVALUE='cumulative'); |
For each URL:
- Open in a browser
- Find the broken portlet:
- Click 'Edit' in the top-right
- Change the
Collection Operation
from 'count' to 'Cumulative':
You can re-run the SQL query, whose results should get shorter after each gadget is fixed.
Step 3: Uninstall user.jsp
Log out (of whichever user you last became) and back in as yourself.
...