Create a copy of a page by Scriptrunner event

JP _AC Bielefeld Leader_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2020

Hi,

we use Comala Documents (former Workflow) in some Confluence spaces.

We need to create a copy of an approved page when a certain label is set on that page.

I thought about using ScriptRunner as it can handle Comala approval events with a custom event handler.

Anyway, I've no ideas how to copy a page from an existing one using a groovy script. Are there any hints on documentation or example scripts? The build in scripts for ScriptRunner don't help me here.

Any idea on a bit more detailed documentation?

Best regards

JP

1 answer

0 votes
James Conway
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2020

Hi @JP _AC Bielefeld Leader_ 

I can't help with ScriptRunner but I wonder if you have considered the Comala Publishing integration. You can set it up to only publish a page when a label is present, e.g.:

{workflow:Different-space publishing with a label}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Published|rejected=Editing}
      {approval:Review}
   {state}
   {state:Published|update=Editing|final=true}
   {state}
   {trigger:statechanged|state=Published|haslabel=your-label}
      {publish-page}
   {trigger}
{workflow}

 If this doesn't work for your use case please do share more details and I'll see if there are any other ways we can help with this.

Kind regards

James
Senior Product Manager at Comalatech

JP _AC Bielefeld Leader_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 21, 2020

Hi,

thanks for the idea & I'm sure this will work, but with Comala Documents being the most expensive app we use, right now we're not able to spend more on Comala Publishing.

I'll check myself for a groovy script solution.

Best

JP

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events