Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Space Shortcuts programmatically

Brian Michelsen June 30, 2023

Hi,

Is a possible to create Space Shortcuts in the sidebar programmatically without creating a app, for example using Scriptrunner or another app?

Best regards
Brian

1 answer

0 votes
Amirul _Adaptavist_ July 3, 2023

Hi Brian,

I believe you can use ScriptRunner to achive this. Please find a sample script below running from Script Console:

import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.atlassian.confluence.plugins.ia.service.SidebarLinkService

@WithPlugin('com.atlassian.confluence.plugins.confluence-space-ia')

@PluginModule
SidebarLinkService sidebarLinkService

sidebarLinkService.create('MTC', null, 'Google Link', 'https://www.google.com/')// sidebarLinkService.create('<SPACE_KEY>', null, '<Link_TITLE>', '<LINK_URL>')

On the above, you would need to pass couple of item which is:

  • <SPACE_KEY> - Specific space you want the link to be created.
  • <Link_TITLE> - Title of the link
  • <LINK_URL> - The link.

If you have further query do let me know.

Regards,

Amirul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events