You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
we are looking for a way to switch the space's color scheme from global to custom as one of the automated tasks during space-copy using Scriptrunner for Confluence (The Built-In Scriptrunner script for copying a space does not copy the color scheme, see https://productsupport.adaptavist.com/browse/SRCONF-1887). We have tried the following method from https://docs.atlassian.com/ConfluenceServer/javadoc/7.1.0/com/atlassian/confluence/themes/ColourSchemeManager.html#setColourSchemeSetting-com.atlassian.confluence.spaces.Space-java.lang.String-
, which does not seem to be working (the script runs successfully, but the custom scheme is not selected):
import com.atlassian.sal.api.component.ComponentLocatorimport com.atlassian.confluence.spaces.Spaceimport com.atlassian.confluence.spaces.SpaceManagerimport com.atlassian.confluence.setup.settings.SpaceSettingsimport com.atlassian.confluence.impl.settings.DelegatingLegacySettingsManagerimport com.atlassian.confluence.setup.settings.beans.ColourSchemesSettingsString targetSpaceKey = "TESTSR300"def spaceManager = ComponentLocator.getComponent(SpaceManager) def space = spaceManager.getSpace(targetSpaceKey) def dlsm = ComponentLocator.getComponent(DelegatingLegacySettingsManager) def spaceSetting = dlsm.getSpaceSettings(targetSpaceKey) spaceSetting.setColourSchemesSettings(new ColourSchemesSettings("custom")) dlsm.updateSpaceSettings(spaceSetting)
Perhaps, you have any suggestions how we can achivive this?
Thank you and best regrads,