With the new Jira Experience on Cloud, there is an ability to add a Confluence space link to a Jira project. With CLI 7.8, there is a new addSpaceLink action to help automate this process.
Make sure you have turned on the new Jira experience in your browser. If you have, then the project view will have a Pages link.
Example - Simple
Where XXX is a project key or name and YYY is a Confluence space key or name:
--action addSpaceLink --project XXX --name YYY
--action addSpaceLink --project XXX (to link to the XXX space in Confluence)
Example - Entire site
If your instance is like our site where every project has a Confluence space with the same key as the Jira project, it is really easy!!!
-a runFromProjectList --continue --common "-a addSpaceLink --project @project@"
We use the continue flag on this request since we do have a couple of projects on our site that do not have a corresponding space and those are going to generate an error. We just want to ignore those and keep going through all the projects. We will check those at the end to confirm the expected projects failed.
Example - Auto create Confluence space
If you need to create a Confluence Space, this will do that automatically to match the Jira Project. Ignored if the space already exists.
--action addSpaceLink --project XXX --options autoCreateSpace