How to change page owner using Rule Web Request

Sérgio Baixo September 26, 2024

I have this automation rule in Jira that is triggered whenever an new issue is created. When that happens, it creates a confluence page with the same name of the newly created issue. My goal is to modify that confluence page's owner using a POST web request or if possible another alternative. That owner must be the reporter from the issue. How can I proceed to do this? Any help is welcome!

rule.png

1 answer

1 accepted

0 votes
Answer accepted
Michel Neeser
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 29, 2024

Hi @Sérgio Baixo

You can modify the owner of a page by calling the "Update page" endpoint, as documented here. Within the request body, you can specify the ownerId in order to change a page's owner.

Hope this helps!

Sérgio Baixo September 30, 2024

Hi Michel,

Thanks for your response. Somehow I am having an error related with the version number..don't know if I'm doing the things the right way. Also I am not sure if it works if I just type the name of the owner as a string.

 

error.pngrule.png

Sérgio Baixo September 30, 2024

looks like the value of version is null, hence not being able to increment it

Sérgio Baixo September 30, 2024

was able to fix the null version issue. At the moment this is the status and all variables are not null. Must be close to the final answer

 

output.pngwebRequest.png

Michel Neeser
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2024

@Sérgio Baixo For the addition in the "number" field to work, you need to write the calculation as follows:

SCR-20240930-qghc.png

If you don't add this "calculation expression" before and after the calculation, you get the error message shown in your screenshot.

Sérgio Baixo October 1, 2024

Hello @Michel Neeser

Thanks it is working as expected, by changing the owner to the issue reporter but this came with a problem, the web request is also deleting the entire content of the page

 

error.png

Michel Neeser
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 2024

@Sérgio Baixo I am not a 100% sure as I can't test it right now, but I think you can just send the request without the "body" property. If you do this, the content of the page should not be deleted.

Sérgio Baixo October 1, 2024

@Michel Neeser you were right, it worked! Thanks a lot for your help :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events