Hi everyone,
I've made a terrible mistake: I was doing some cleanup and used a groovy script to bulk delete some dashboards... And I had paid no attention to it but among them was the System Dashboard, and now it's been deleted and my front page is all broken.
I've tried to run some db queries on a test instance to check what I could do. I switched the ID and Sequence values of the System Dashboard in the database with another dashboard I had just created, hoping that this way I would be able to replace the usual system dashboard with a dashboard I would have created.
However, after restarting Jira, I was surprised to find out that the app had found a way to follow the old System Dashboard even though I had changed its ID and sequence value through SQL queries. It was now empty (as I had made no change to the portletconfiguration table that associates gadgets to dashboards) and when I tried to add a gadget to it it was associated to the new ID I had set to my old System Dashboard. Basically, Jira had followed it.
I have no idea how this is possible. Does someone know the rules how Jira defines what the System Dashboard is? I'm wondering if it may have something to do with the username of the dashboard creator (the System Dashboard is the only one for which it's empty) ot its title (it needs to be called System Dashboard maybe).
Cheers,
Simon
Hi guys, thank you for your answers.
It enventually worked with the following (not sure everything is necessary, as I said in the first post it doesn't seem like the ID needs to be 10000 but I think it's better if it is):
Also, don't forget to update the sharepermissions table to set the sharetype as 'global' (and param1 and param2 = null) for entityid = 10000 and entitytype = 'PortalPage'. For consistency, also check the favouriteassociations table that manages users' favourite dashboards and filters.
You'll need to restart Jira or flush() if you have Scriptrunner so that it's taken into account ( https://docs.atlassian.com/software/jira/docs/api/7.2.6/com/atlassian/jira/portal/CachingPortalPageStore.html ).
I also tried to associate the existing portletconfiguration rows (the gadgets on the dashboard) to portalpage = 10000 but it didn't work, even though I had a bunch of gadgets associated to the 10000 dashboard the dashboard was still empty. When I went to Default Dashboard in System to add a gadget to it it removed the rows from portletconfiguration and just added the new gadget I had added. Everything worked fine anyway. Maybe it was just a layout issue or I don't know.
Anyway, thank you again, hope this can be helpful to someone someday.
Cheers,
Simon
You're not the first to do. The API page about this has some indicators:
I don't recall if the id has to be 10000 to make a dashboard the system dashboard. Likely the name has to be as expected too. Digging around in the source code it's not very clear (founders' code?)
You may have to look at the DB tables in a backup, not a new instance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @slucchesini
Welcome to community
The system dashboard is built into Jira. An admin can configure it but if something like what you did occurs, when the system is restarted it will replace it with the default dashboard made by Atlassian.
If you have a stage instance or dev instance you can recreate it from there, otherwise to get it back you would most likely want to manually remake it. You could restore Jira to before the change occurred but any data from then to now would be lost.
Best,
Clark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.