youngmon/atlassian-qna huggingface dataset:
creating confluence pages programmatically
Asked by Petr Zhura:

I need to create a large amount of confluence pages, which describe an api (dozens of services and hundreds of pages). Trying to do this by hand makes me crazy.

I want to implement a script which would do it for automatically. The script would fetch a domain model for services, create appropriate markup and post it using confluence rest api.

As far as I understood, confluence uses custom markup for page content. Certainly, I could create a template for each element like paragraph or table und render markup based on my teamplates. But instead I would rather like to use an Java api for its creation.

Does something similar exist?


Answers:
author: James Richards
body: Hi Petr,

Using a Java for this would probably be way too much for what you're trying to achieve.

There are 2 ways you can do this, one would be to use a template, where you can have fields that populate the data or create pages with a REST call.

For creating a template, you'd follow the steps here

* <https://confluence.atlassian.com/doc/create-a-template-296093779.html>

And for creating pages with a REST call, which I think would be better for you since it sounds like you have complex pages with content that already exists somewhere, try this document as a start

* <https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/>

Remember you need to use the XHTML markup to create the pages. So, I'd suggest creating an example page and then go to **... \> View Storage Format** to see what it looks like, and then use that to create the page you want with the REST call.

Hope this helps.

Thanks, James


Tags: developer

rest-api
My Custom Blueprint is presented in the list of pages in page tree
Asked by Dmytro Slobodenyuk:

How can i set up my blueprint to hide it from page tree

![blueprint.png](/t5/image/serverpage/image-id/16250i617BECC0308E6E3A/image-size/large?v=v2&px=999 "blueprint.png")


Answers:
author: Shannon S
body: Dmytro,

Is this a Blueprint you developed, or is it another page you created to be used as a blueprint? It should only be displaying plages in the Page Tree and not actual Blueprints that were developed. Those are only available when you click Create to create a new page.

Regards,

Shannon

comments: author: Dmytro Slobodenyuk
body: Yes I have developed that blueprint, and i have item on the page tree, that has list of pages have been created by blueprint, how could i hide or remove from page tree ?


author: Shannon S
body: Hi Dmytro,

Thank you for clarifying.

If you don't want them to display on the side page tree, then you need to orphan those pages.

Have a look here:

* [How to hide pages from showing on the left panel navigation tree in Confluence](https://confluence.atlassian.com/confkb/how-to-hide-pages-from-showing-on-the-left-panel-navigation-tree-in-confluence-420184433.html)

> To hide a page, create it at the root of the space instead of as a child of the space's home page.

1.
   > Navigate to the space and click **Create**
2.
   > Select a template if required and click **Create** in the bottom right corner
3.
   > Click **Location** at the top next to the breadcrumbs and backspace over the field **New parent page**
4.
   > Click**Move** in the bottom right corner
5.
   > The page will be created on the space you designated but not on any parent page. This is called an "orphan page".
   *
     > To access the orphan pages go to **Space Tools \> Reorder pages**

Let me know if you have any trouble.

Regards,

Shannon


author: Dmytro Slobodenyuk
body: when i create a new page based on my blueprint, then on page tree i see new page and my blueprint, i don't want to display my blueprint

![Untitled1.png](https://community.atlassian.com/t5/image/serverpage/image-id/16259i2445E9ED3718EBD0/image-size/large?v=v2&px=999 "Untitled1.png")


author: Shannon S
body: Dmytro,

It will always display on the sidebar page tree until you manually go in and orphan the pages from my instructions earlier.

You will need to do this each time you create a page.

Regards,

Shannon
How to show content in Environment column using Jira Issue/Filter macro
Asked by Todor Plachkov:

Hello guys,

I am using the **Jira issue/filter** macro. I want to include the "Environment" field (filled in the Jira) and to show it in the table, generated by the macro.

Unfortunately when I add the column "Environment" in the macro, it is empty in the Confluence page, although it has content in the Jira issue.

I've attached some images so you can see what's the problem.

**Jira issue:**

![Environmet 1.png](/t5/image/serverpage/image-id/16244iCE76EAE43A97C3DB/image-size/large?v=v2&px=999 "Environmet 1.png")

Confluence page with the **same** issue but with **empty** field "Environment":![Environmet 2.png](/t5/image/serverpage/image-id/16243i89C2A651B728893D/image-size/large?v=v2&px=999 "Environmet 2.png")So can you give some suggestions, where the "link" is broken between the two products. Every other column I've added shows the exact content, but not the "Environment".


Answers:
author: Todor Plachkov
body: So, any ideas?

comments: author: Nisha Hajamohideen
body: Have you checked your filter that you use from Jira?

Does your filter results show the issues that contains values for the field environment?


author: Nisha Hajamohideen
body: I tested the same scenario and the environment field gets populated.

On the display field option in confluence macro, could you check if you have 2 custom fields with the same Environment?

That could be a possibility where you have 2 custom field with the same name and you have used the field that does not have data in the display option.

comments: author: Todor Plachkov
body: Thanks for the quick reply. The Environmet fields are not even 2 but 3 ! :)

![Environmet 3.png](https://community.atlassian.com/t5/image/serverpage/image-id/16249i5D5065AE8F43807D/image-size/large?v=v2&px=999 "Environmet 3.png")

Unfortunately, after I've inserted all three of them, still the column in the macro was empty.
jQuery version
Asked by M?ris Bahtins:

Hello,

Could you please tell me what jquery version use Confluence server 6.2.1 and 6.7.1?

Thanks in advance!

-Maris


Answers:
author: rulebot
body: Hi,

here's some Javascript-code that can be pasted in your browser console to display the currently running jQuery's version number:

```
// Alert the currently running jQuery-Version if jQuery was initialized.
if (typeof jQuery != 'undefined') {?
??? alert(jQuery.fn.jquery);
}
```

Hopefully, this will save others some time.


author: Igor M.
body: Hey Maris,

I came across your question after I worked on your ticket for the same question.

To make the answer available to others that might look for it, I will put the same answer I gave you over the ticket.

Confluence uses custom jQuery version 1.7.2.1-confluence-custom-m03 library. The version is customised and there is no official statement on plans to update it. If there are specific security vulnerabilities associated with jQuery or other components like bundled Java, these are reviewed individually by the security team, addressed and details about fixes become available in our public bug tracking site.

Hope this helps.

Regards,

Igor


author: Thomas Schlegel
body: Hi Maris,

maybe the answers to this question might help you:

<https://community.atlassian.com/t5/Confluence-questions/Use-of-Jquery-in-Confluence/qaq-p/9237>

comments: author: M?ris Bahtins
body: Hey Thomas,   

It seems this is not what i am looking for. So my story is at the moment i am using Confluence 5.8.5 which has jquery 1.7.2 and i can see that jquery version is vulnerable and can cause a lot of damage. Soon i am planning to upgrade my Confluence, and i am just looking what jquery version they use.


author: Thomas Schlegel
body: I've just tested that script with my Confluence 6.7.0 (I don't have 6.7.1 yet) and there JQuery 1.7.2 is still used.
Is it possible to create a 'hard copy' of a task report in a page in confluence
Asked by Olivier Marchesini:

Hi,

Using the task report is very handy for managing the tasks.

But when documenting a meeting I want to 'freeze the task report' for the minutes in order token what was the task list t the meeting three month ago. Is there a way to do this


Answers:
author: Thomas Schlegel
body: Hi Olivier,

although the data of the task report changes, the page source itself does not change. So no, you can't freeze the task report to a specific date and you've got no page history.

I would make a screenshot of the task report and save this screenshot as an image on your meeting documentation.

comments: author: Olivier Marchesini
body: I understand, thank you.

I think you are right this can be the easiest way to realise it.


author: Steffi Frank
body: Hi Oliver,

guess you need to create a task report for each meeting note (page)... configuring the task report allows you to limit the task to a single page or pages with a certain label...
Confluence add header to mail request
Asked by Syed Hussain:

I have setup mail server through admin console.I am able to send mails for actions.But my exchange team is asking me to add a header(x-binding) to the trigger mail request.

I have confluence source code.could you help me in finding the code where i need to make changes?


Answers:
author: Vasiliy Zverev
body: There is a setting of mail server - prefix. It is added to all mails from Confluence

comments: author: Syed Hussain
body: prefix will be added to mail "Subject".But i wanted to add binding variable as a metadata to smtp post request header.

example:

X-binding: marketing

Content-Type: text/html

Subject: Simple Binding Test

From: no-reply@mail.test.com

To: testaccount@gmail.com

\<html\>\<body\>hello world\</body\>\</html\>
Can I keep accessing Confluence after the cancellation?
Asked by nico:

I'm currently subscribing to both Jira and Confluence cloud. Now if I cancel Confluence and keep Jira, can I still access my documents on Confluence in a read-only mode?


Answers:
author: Thomas Schlegel
body: Hi Nico,

no, you can't. You should export your data.

Look here:

<https://confluence.atlassian.com/cloud/data-storage-faq-873871367.html#DatastorageFAQ-WhathappensifIdeactivateoneofmyproducts>

comments: author: nico
body: OK. Thanks.
Create from Template' Macro No Longer Creates Child Pages
Asked by Sudheer Kumar Vempala:

he "Create From Template" macro is used extensively across various spaces to accelerate 1) the creation of pages and 2) correctly place pages in the confluence page hierarchy.   

There is now a bug with 2) that I have observed for several weeks:   
Expected Behaviour:   
\* confluence page is created as a child page of the page with the "Create from Template" macro   
Actual Behaviour:   
\* confluence page is created as a child of the space root-page that the macro is in

<br />

There is an old Confluence Bug which describes the same behaviour that seems to have crept back into the new version   
\* <https://jira.atlassian.com/browse/CONFSERVER-29859>


Answers:
author: Hassan Aftab
body: Hi Sudheer

I have tested this with Confluence version 6.6.1 and 6.7.2, and it seems to work fine. Using *template macro*the page is created under the page, where the macro was placed.

Can you please specify which version of Confluence are you using? So, I can test it with the version and reproduce this bug.

Thanks, Hassan

comments: author: Sudheer Kumar Vempala
body: Hi Hassan,

Thanks for your work.

* [Confluence](http://www.atlassian.com/software/confluence) 6.3.4

we are running the above version
How to configure Change history only to show the one with comments?
Asked by hoogesh:

Hi,

We want to be able to configure the Change history only to show the one with comments or the top 10 revisions.

Thanks,

Hoogesh


Answers:
author: Shannon S
body: Hello Hoogesh,

It's not possible to limit the Change-History macro in that way.

When you say the "top 10 revisions" can you let me know what you mean by that? What determines if a revision is in the top 10?

Regards,

Shannon
Suggestive text in tables
Asked by Melissa Espinosa:

it?s possible that the suggestive text remain in the names of the columns as a tooltip?


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Melissa Espinosa](/t5/user/viewprofilepage/user-id/1167082)

If by suggestive text you mean the text placeholders, then no. I don't think that's possible.
Confluence Create shortcut not working
Asked by Jeff Scattini:

Is anyone else having an issue with the keyboard shortcuts in Confluence Cloud?

Every time I hit the **C**keyboard shortcut, the Create dialog box hangs and will not display templates.

If I click the Create icon the dialog window appears normally.


Answers:
author: Shannon S
body: Hi Jeff,

I can confirm I am able to create pages with the **C** shortcut on my Cloud instance without any issues.

This would need to be addressed by our [Support Team](https://support.atlassian.com/contact/#/) because your instance may need reindexing or there may be an issue with a specific space that they'll be able to discover in your logs.

I attempted creating a ticket for you in Support, but your email address isn't associated as a billing or technical contact with any one Cloud instance. I've created a ticket regardless, but am sending you an email for more information.

Thank you!

Regards,

Shannon


Tags: confluence-cloud
Migrating Confluence account and content
Asked by Steven Yong:

I have some spaces and pages in Confluence using an account of a company of mine. I set up another new company and purchase a new account of Confluence for it.

Now I need to move or copy some of the spaces and pages from my original company account into the Confluence of this new account.

Is [exporting using XML](https://confluence.atlassian.com/display/CONF56/Exporting+Confluence+Pages+and+Spaces+to+XML "exporting using XML") the way to go? Will all my spaces and pages formatting and images be reserved correctly?


Answers:
author: AnnWorley
body: You got it! XML export/import is the cleanest way to move content from one instance to another, preserving formatting and images. Please see [Import Content Into Confluence](https://confluence.atlassian.com/doc/import-content-into-confluence-191141.html) for more details.

comments: author: Steven Yong
body: Thank you Ann.
Generate macros in Confluence
Asked by Melissa Espinosa:

Hi good day.

Can you explain how to generates a macro in conluence?

Thank you


Answers:
author: Nic Brough -Adaptavist-
body: Not quite sure what you mean by "generates a macro", but here's a few things you might mean:

* To use a macro on a page, use the macro browser in the tool bar or type { and then a guess at the name of the macro so Confluence can suggest a macro you might mean
* To add a new macro (1) - go to admin -\> user macros and add one there
* To add a new macro (2) - write an add-on to provide a new macro

comments: author: Melissa Espinosa
body: is the option:

* To add a new macro (1) - go to admin -\> user macros and add one there


author: Melissa Espinosa
body: is the option:

* To add a new macro (1) - go to admin -\> user macros and add one there
live edit javascript in html macro
Asked by Andrew Johnson:

I want to create a simple web app embedded in a Confluence page that can modify page attachments. I have my code in a html macro. The devil is in the details with the API calls, so I would like something like codepen, jsbin, or jsfiddle with live-updating interactive code. I am not allowed to whitelist CORS requests from any of the services I just mentioned (or any other "external" server).

What is the best way to achieve this interactive development environment so all AJAX calls come from my internal Confluence server and avoid CORS blockage?


Answers:
author: James Richards
body: Hi Andrew,

Interesting question. CORS issues are browser based not server based - so it's kinda hard to work out a solution. It sounds like you want to have externally hosted code in a live editor environment - so you can edit the code and then test straight away locally.

So, you could run an outgoing proxy that takes URLs for an internal address and context path and changes it to an external path.

Otherwise, we use a browser plugin called Tampermonkey which allows for live updating of external Javascript code we host in Bitbucket. It runs locally on the browser.

I'd have to really see the configuration more and try and get my head around what's happening to understand the network topology to find a valid solution.

Can you give some more specific details or example?

Thanks,  
James.
Using variables in short cut links
Asked by John Paliotta:

Hi there,

I have 3-4 shortcut links (@name) configured in confluence to allow us to create dynamic links to web pages outside of Confluence. I often create a table with a row that has several of these links, in different columns.

Right now I am typing the number and short cut link multiple times, and I am wondering if I could use a variable somehow to save some effort

For example, now I am typing

\[123@mypage\] \[123@yourpage\] \[123@hispage\]

Ideally I would like to do:

number=123 and then

\[$number@mypage\] \[$number@yourpage\] \[$number@hispage\]

Thanks in advance for any help,

John


Answers:
author: ilja Rajewitz
body: Hello,

we create now for our department a new wiki-site with a lot of external link to our shares/folder structure. Thus, we have the same/similar case.

Example from our department share: **//server1/company/plant/unit/department**/internal/tool1/documentation

The first part should be in a variable

**$department_share = //server1/company/plant/unit/department**

Link to Tool documentation:

**$department_share**/internal/tool1/documentation

**$department_share**/internal/tool2/documentation

**$department_share**/internal/too2/documentation

With this structure we are save in the future when the department share are change in the company. We need only change the global variable **$department_share** and not aprox 200 Links on the wiki-site. For example they change the department share to **//server*2*/company/plant/unit/department**

Is is possible to create this kind of "variable" links with Confluence?

Thanks

Ilja


author: James Richards
body: Hi John,

Interesting post. I'm trying to get my head around how the \[123@mypage\] creates a page external to Confluence.

Is this an Add-On or plugin that you have, or some custom JavaScript running?

Regards, James
Autoconverst link not working
Asked by Anne Shibuya:

According to this page <https://confluence.atlassian.com/doc/jira-issues-macro-139380.html>,

auto-convert should work automatically, but it is not working in my environment. Could you please help me find out why?

**Auto-convert:** You can paste URLs directly into the Confluence editor (without calling up the macro browser). Confluence will automatically convert the URL into a Jira Issues macro.


Answers:
author: Shannon S
body: Hi Anne,

1. Can you let us know what versions of Confluence and Jira you're running?
2. Has this ever worked?
3. Can you make sure that [the remote API](https://confluence.atlassian.com/doc/enabling-the-remote-api-150460.html) is enabled?

Thank you!

Regards,  
Shannon

comments: author: Anne Shibuya
body: Hi Shannon,

1. We are using Confluence 6.7.1 and Jira 7.3.6. I can't updated JIRA properly since they updated the connector.

2. It did work before. It have stop after one of the updates, not sure what version.

3. The remote API is enabled.

:(

Thank you.

Anne


author: Shannon S
body: Thanks, Anne, for checking that.

Does the connection work the other way? I.e., if you link a Confluence article in a Jira issue, does that work?

Can you have a look at your [Confluence server logs](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html) and let us know if you see any errors at the same time that you attempt to link Jira issues in Confluence?

Regards,

Shannon
Blurry Bullet Lists in Confluence 6.7.x
Asked by Seth Gillespie:

Hi,

We just upgraded, and in edit mode, is it just me or are these extremely blurry?

![2018-03-01_13-31-22.jpeg](https://community.atlassian.com/t5/image/serverpage/image-id/16199i3CEC27A26AC9CBA2/image-size/large?v=v2&px=999 "2018-03-01_13-31-22.jpeg")

The "old" icons are clearly less blurry than the "new" 6.7.1 icons, especially the numbered list.


Answers:
author: Markus Raab
body: Same here - we switched to 6.7.2 and I experience the same.

In general some things are blurry now, e.g. the "like" button or the list of pages that have a specific label.

It's only blurry if on 100% though. If I zoom in to 200% or higher it does not show blurry anymore.

![blur2.png](https://infopoint.celum.company/download/attachments/66357107/blur2.png?version=1&modificationDate=1521038360053&api=v2)

![blur4.png](https://infopoint.celum.company/download/attachments/66357107/blur4.png?version=1&modificationDate=1521038360567&api=v2)


author: Thomas Ohrbom
body: I completely agree. The whole editor toolbar looks very blurry now.
Is it possible to inject JavaScript code in Confluence ?
Asked by Olivier Tisserand:

Hi all,

We would like to analyse the behavior of our Wiki's visitors through a behavior analysis tool (BeamPulse), and henceforth would need to inject a JavaScript tag on the visited pages.

Is it possible with Confluence Cloud ?

Thanks for any help,

Olivier


Answers:
author: Soane
body: Hi Olivier,

Due to the [Restricted functions in Confluence Cloud](https://confluence.atlassian.com/confcloud/restricted-functions-in-confluence-cloud-734070955.html) it won't be possible to inject a JavaScript tag on the pages.

However, you can try the [HTML Macro for Confluence Cloud](https://marketplace.atlassian.com/plugins/biz.artemissoftware.confluence.html.HtmlMacro/cloud/overview) which is a third-party add-on that will allow you to embed content from HTML and JavaScript. In case you need assistance to configure it, you can reach the vendor's support at [this link](http://artemissoftware.freshdesk.com/support/home).

Cheers,  
Soane

comments: author: Technical Support
body: Hi Soane,

Thanks a lot for your answer, sounds very good to me.

Have a great WE,

Cheers,

Olivier


Tags: confluence-cloud
Confluence Installation
Asked by Fr0zt:

Hello.

During Confluence installation, in the database connection screen if I choose "Microsoft SQL Server" , in the bottom, I have a field named "Instance Name".

- What is this field?

- Is it mandatory or can I leave it blank? The process goes on If I leave it blank.


Answers:
author: Shannon S
body: Hi Hugo,

According to our [Database Setup for SQL Server](https://confluence.atlassian.com/doc/database-setup-for-sql-server-9258.html#DatabaseSetupforSQLServer-UseaJDBCconnection(default)), that you have likely already reviewed:
> Field: Instance name
>
> Description: To find out your instance name, connect to your database and run one of the following:  
>
>     select @@SERVICENAME;
>
>     SELECT SERVERPROPERTY('InstanceName');
>
> If you have a default named instance setup in SQL Server, you won't need to specify this parameter.

I hope that clarifies things for you! Let me know if you have any questions.

Regards,

Shannon

comments: author: Fr0zt
body: But If I want can I leave it blank?


author: Fr0zt
body: This is, in the "simple" mode.


author: Fr0zt
body: I read it now. Sorry I didn't notice that If I had default named instance SQL SERVER I could leave it blank.


author: Shannon S
body: No worries, Hugo!

That's right, if it's still the default name, you don't have to specify it.

Kind regards,

Shannon