The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events