youngmon/atlassian-qna huggingface dataset:
Getting macros from page properties via Java/Groovy API
Asked by Tom Maughan:

I'm trying to write a bit of code that pulls the @ user mention details from a specific line in the page properties of a particular page.

I'm using the PagePropertiesService with getReportFromContent(page) and then getAllMacroInstances().

I can then iterate through list returned by getAllMacroInstances(). I can locate the page property am looking for BUT getDetailStorageFormat() returns a blank string.

If I use a page property that is just a string typed into the page rather than a macro I get the expected text. It appears that getDetailStorageFormat() does not work when there is a macro involved.

It also appears that the PagePropertiesService is an undocumented API.

I borrowed quite a bit of code from here:

<https://community.atlassian.com/t5/Confluence-questions/How-can-I-filter-my-Confluence-search-by-page-properties/qaq-p/953887>

Has anyone else tried this?


Answers:
author: Ken McClean
body: I'm not 100% sure what you were going for with your approach to the macros, but you can search the body of a given page for an @ mention with this script  

@-mentions take the form of **ri:userkey="8aab818c73caedf00173caf477050000"** , where the string of characters is the user ID. Therefor if we parse the body of a page for that string, we'll turn up any @-mentions in the system.  

Worth noting is the fact that while you can return the body of a page without the wiki markup, it doesn't include the @. So you'd just be searching for the name of the user, which is ultimately less specific.  

*** ** * ** ***

import com.atlassian.sal.api.component.ComponentLocator  
import com.atlassian.confluence.spaces.SpaceManager  
import com.atlassian.confluence.pages.PageManager  
import com.atlassian.confluence.pages.Page  
def pageManager = ComponentLocator.getComponent(PageManager)  
def spaceManager = ComponentLocator.getComponent(SpaceManager)  
def spaces = spaceManager.getAllSpaces()  
def targetMention = 'ri:userkey="8aab818c73caedf00173caf477050000"'  
spaces.each{spaceObj -\>  
//Iterate through all spaces in the system  
def pages = pageManager.getPages(spaceObj, false)  
pages.each{page -\>  
//iterate through all pages in each space  
if(page.getBodyAsString().contains("${userkey}") `&& page.version == page.latestVersion.version`){  
//Check if the page body contains the target, and ensure that the page we're checking is the latest version of the page  

log.warn("${page.title} contains an @ mention of the user")}  
}
}


Tags: confluence-server

server
Can I convert png to draw.io format?
Asked by Perselope Azul:

I created a draw.io and attached it to a page. For unknown reasons I only find the png format attached. Please can I convert the png format into draw.io? How?

Thank you


Answers:
author: Perselope Azul
body: I am not an expert in confluence so I thought I was missing a draw.io file but I realised that in other page with a draw.io, the png file is attached to the page. So my question will be: if I have the png attached to the page, how can I see the draw.io,?

comments: author: Perselope Azul
body: Done. I just got restored the draw.io format that was deleyed.....


author: David Benson _draw_io_
body: That's the correct solution, by default the saved PNG does not contain the diagram data.


author: swapnil thakare
body: Bro I have the same question but what is the answer.


Tags: atl-gruland

new-to-confluence
Formulas para tabela
Asked by Paulo Barbosa:

Bom dia,

Queria saber como eu incluo uma formula de soma, ou subtra??o de alguns numero dentro de pagina do confluence.


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@Paulo Barbosa](/t5/user/viewprofilepage/user-id/4123825) ,

You'll need additional apps to perform calculations in Confluence, there is no such feature out-of-the-box. For example, you may try the [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=cloud&tab=overview) add-on.

It provides several macros that will help you with different cases:

* [Table Filter](https://docs.stiltsoft.com/display/public/TFAC/Calculations+in+tables) (filters your tables, and allows to calculate average, min/max, sum and multiplication numbers for your columns)
* [Pivot Table](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Pivot+Table+macro) (similar to pivots in Excel)
* [Table Transformer](https://docs.stiltsoft.com/display/public/TFAC/Custom+Transformation+-+use+cases+with+advanced+SQL+queries) (allows you to perform different table calculations with the help of SQL queries)


Tags: cloud

confluence-cloud
Configure gmail as SMTP server for Confluence Cloud
Asked by Michel Kapelle:

Hi All!  

Any help is very much appreciated, thanks for taking the time!  

I have created an gmail adresses and configured it as the Confluence Mailserver as described in:

<https://confluence.atlassian.com/confkb/how-do-i-configure-confluence-to-use-gmail-as-the-mail-server-42795030.html>

Triplechecked username, password, port settings but I still get the following reply when sending the test-mail:

> An error has occurred with sending the test email:  
> com.atlassian.mail.MailException: javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at  
> 535 5.7.8 <https://support.google.com/mail/?p=BadCredentials> jw9sm12231727ejb.33 - gsmtp


Answers:
author: Michel Kapelle
body: Turned out the setting "allow less secure apps to acces/use gmail" has to be turned on in the GMAIL settings when sending from an HTTP (not HTTPS) Confluence server setup. Might be a good thing to mention that in the mentioned <https://confluence.atlassian.com/confkb/how-do-i-configure-confluence-to-use-gmail-as-the-mail-server-42795030.html>


Tags: confluence-server

server
Sorting date ISO
Asked by Patrik:

### Confluence 7.4.1
I have a table with a column of datetime text with varying detail in iso. For some reason the first item do not get sorted correctly, even though regardless if sorted as date or text, the correct position should be the same. {#toc-hId-1196194222}

2020-10-09 08   
2020-09-10   
2020-10-06  
2020-10-07  
2020-10-07  
2020-10-07 07:58  
2020-10-07 14:55   
2020-10-07 16:03  
2020-10-07 17:31  
2020-10-07 23:05  
2020-10-08  
2020-10-08  
2020-10-08 16:00   
2020-10-08 18:00   
2020-10-09 08:50  
2020-10-09 9:15  
2020-10-09 9:34  
2020-10-09 10:38  
2020-10-09 11:15


Answers:
author: Bill Bailey
body: All of your dates have a space after the first hyphen/dash, except "2020-09-10". Just do a find for "- " and replace with "-" and it will sort correctly.


Tags: confluence-server

server
Database SELECT to get all label from a specific space
Asked by Henning Karl:

Hello together,

I search a SELECT to get a list of all labels in a specific space (by SPACE-ID) on the database.

I have already tried a few things here, but nothing gave the right result.   

Yes I know, it gives a macro with options, that I got all labels from a specific space. But I think the macro gives to much results.  

Can anyone help me?  

<br />


Answers:
author: Dominic Lagger
body: Hi [@Henning Karl](/t5/user/viewprofilepage/user-id/624143)

I tried a bit and think got a good statement:

```
Select cl.labelid, l.name, s.spacekey, count(l.name) as count from content_label cl
join label l on l.labelid = cl.labelid
join content c on c.contentid = cl.contentid
join spaces s on s.spaceid = c.spaceid
where c.CONTENT_STATUS != 'deleted' and c.contenttype != 'SPACEDESCRIPTION' and s.spacekey = 'SPACEKEY' group by cl.labelid, s.spacekey, l.name
order by count desc;
```

This makes a list of all labels of a space. But not "Spacedescriptions" and not deleted pages.

Hope this is a good hint for you.

Regards, Dominic

comments: author: Henning Karl
body: Hi [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)

I tried your SQL and it's almost perfect.  

I added the following phrase on the where clause, because the SQL returned additional all favourites from each users from the pages in the space.

```
and l.name != 'favourite
```

So the SQL is now this one:

```

Select cl.labelid, l.name, s.spacekey, count(l.name) as count from content_label cl
join label l on l.labelid = cl.labelid
join content c on c.contentid = cl.contentid
join spaces s on s.spaceid = c.spaceid
where c.CONTENT_STATUS != 'deleted' and c.contenttype != 'SPACEDESCRIPTION' and s.spacekey = 'SPACEKEY' and l.name != 'favourite' group by cl.labelid, s.spacekey, l.name
order by count desc;
```

Thanks a lot of your help.  

Kind regards,   
Henning


Tags: confluence-server

database

label

postgres

select-list

server

sql
How do users set their own default space?
Asked by Richard:

I cannot see how to set my own individual default landing space when accessing Cloud Conference. I know how to do it for Confluence Server via my user profile and it was relatively straight forward (well, ish!)

I don't want to land on the site dashboard and then have to navigate through.

Is this not possible in Cloud?


Answers:
author: Arthur Mack
body: Not that I am ware of, the default space is what the admin sets.


Tags: cloud

confluence-cloud
Disable notifications for a created site
Asked by Jason Walther:

Hi all,

I created several pages in Confluence for our Team.

Everytime someone edits one of these pages I get a notification on the top right corner (bell icon). -\> User XYZ has edited your page.

I already disabled E-Mail notifications for this an it works but how can I turn off the notifications on the top right corner? I don't want to get a notification everytime for these events...

Additional information: I'm not watching any sites or spaces in Confluence. The only information that is linked to my user is that I have created these pages in the past.

Thanks and Reagrds,

Jason


Answers:
author: Arthur Mack
body: I don't think you can disable it on cloud, at least I have not seen where that can be done. To me its not a really a distraction like E-Mail as one click and they are gone.


author: Marcel Kleinl?tke
body: Is it possible to disable page-create-event for Notification


author: Jason Walther
body: Hi all,

it seems that in Cloud you can't turn off these notifications...

Thanks and Regards,

Jason


author: Nicolas Casel
body: Hi Jason,

the Notifications Workbox is managed by your Confluence administrator:
> Administrators can enable and disable the workbox on your Confluence site

<https://confluence.atlassian.com/conf615/workbox-notifications-967338133.html>

It can't be setup (enabled or disabled) at user level, as it is setup for the whole Confluence platform.


Tags: cloud

confluence-cloud

notification
How does smart links work together with macro autoconvert?
Asked by Terje R?stum:

The new smart link feature looks great and is really useful. But how will it function alongside the macro autoconvert feature?

If a customer has installed an app which has defined a macro autoconvert for a dropbox url for instance. What will take precedence? The apps macro autoconvert or smart links?

If an app no longer functions by pasting the url, because smart links takes precedence, clients using the app could be confused.


Answers:
author: Diego
body: Hello [@Terje R?stum](/t5/user/viewprofilepage/user-id/3954135) ! What I can tell you is that If an instance has a macro that overlaps with a Smart Link, the macro will always take precedence.

Your example where the customer has a Dropbox plugin that uses autoconvert fits this. The macro autoconvert will take precedence over smart links.

Just as a side note. The smart links feature is only present in our Cloud environment when using Fabric, the new editor. This feature is not present in our legacy editor.

I hope this answers your question!

comments: author: Terje R?stum
body: Great, thanks!


Tags: cloud

confluence-cloud

connect

link
Scroll Table Layout
Asked by Aleksandr:

?????? ????!

?????? ??????? ???????? 10x100 ?????. ??? ??????? ?????? ??????? ??????? "Scroll Table Layout" ? ?????? "Repeat table header" ??? ????????. ?? ??? ??????????? ????? ???? ????? ? ???????, ?????? ????????? ????????. ??? ????????? ????????????? ??? ?????????? ??????? ????????? ????? ???????.


Answers:
author: Andrii Maliuta
body: ?????????, ?????? ????.

? ??? ??????? ???? ? ??????? **Table Layout** ??????? **Scroll Word Exporter** ?? **K15** . ??????? ?? ??????? ????? ?????????? ? ?? ???. ????????? - <https://help.k15t.com>.

?????? ????? ??????? ???????? ???????? ????????? ?????????? ?????? ? ??????? ?? ?????? ???????? ? ????? Word ??????? (? ????? ???????), ??? ??????? ?????? ????? ?????? ???????? ? Confluence. ??? ????? ????????????? ????? 1 ???.

???????


Tags: new-to-confluence
How can I reference a code block macro on a different page?
Asked by Marc R?dder:

Hi,

basically I would like to have a code block macro somewhere and then I want to insert that into another page too (without copy+pasting).

Is there a possibility how I could reference this code block macro and the contents will also show up on another page?

A free solution is preferred.

Regards


Answers:
author: Bill Bailey
body: It is not specific to the code macro, but this plugin will do what you want for any block of content (I highly recommend it for content reuse): [multiexcerpt](https://marketplace.atlassian.com/apps/169/multiexcerpt?hosting=cloud&tab=overview)

comments: author: Marc R?dder
body: Thanks! I forgot to mention that I?m looking for a free solution.


author: Bill Bailey
body: Yeah, I assumed so. As far as I know, none exist. ;-)


Tags: cloud

confluence-cloud
Page permissions
Asked by ???:

hello,

How to let the child page inherit the permission of the parent page?

I set the permission to limit the edit of the parent page, but the child page is not restricted,how to set?

thanks

Best

Hongxl


Answers:
author: Andreas Purde
body: Dear Hongxl,

edit permissions do not inherit in Confluence. Atlassian decided not to implement this feature - let's call it an interesting decision. Therefore you have to use an app:

1. Our [Edit Permission Inheritance](https://marketplace.atlassian.com/apps/1221313/edit-permission-inheritance?hosting=server&tab=overview)
2. [ScriptRunner](https://marketplace.atlassian.com/apps/1215215/scriptrunner-for-confluence?hosting=server&tab=overview)

Kind regards

Andreas

comments: author: ???
body: are there any free app?


Tags: confluence-server

server
Collaborative editing files hosted on a page
Asked by Kseniya Krylova:

Good afternoon.  

Can you please tell me if it possible collaborate edit the files placed on the page in Confluence with the help of some plugin since this works in a SharePoint? Now we have found only the ability to block a file from editing if it is opened by another user using the plugin GoEdit. But we want to ?ollaborate edit the file and see the edits of another user in real time.


Answers:
author: Nicolas Casel
body: What about:

<https://marketplace.atlassian.com/apps/1213092/google-drive-for-confluence-official>

It should offer collaborative edition (although I can't find it in the list of features).

comments: author: Kseniya Krylova
body: The main idea of this plugin is embed Google Docs, Sheets, and Slides files in Confluence pages. But based on the security policy of our company, we cannot place files on these resources, which is why we use confluence.


Tags: confluence-server

server
Date macro // shows "NULL"
Asked by Ulrich Hinze:

Today we upgraded to Confluence Server 7.7.4 and I recognized that when you use // to enter a date "NULL" appears after the date in the headline of the selector popup window.


Answers:
author: Dominic Lagger
body: Hi [@Ulrich Hinze](/t5/user/viewprofilepage/user-id/3530115)

I found a bug in the atlassian backlog:

* [CONFSERVER-59310](https://jira.atlassian.com/browse/CONFSERVER-59310)

I also voted for this :-) Feel free to vote too.

Regards, Dominic

comments: author: Ulrich Hinze
body: Thanks, great hint!

Comment added, voted too :o)

Cheers, Uli


Tags: confluence-server

server
How to get the creator of a page without admin rights?
Asked by Jens:

Hello,

I've searched a lot - it looks like a lot of people want to show the name of the creator of a page in a special place on the page. The solutions that I have found only work by writing my own macro, for which I need admin rights, which of course, I do not have as a normal user.

Is there a solution instead of entering [@User](/t5/user/viewprofilepage/user-id/115298) manually?

Thanks!

Jens


Answers:
author: Jens
body: Upps! I was to stupid . I was looking for the macro but overlooked it.... ;)  

I will check it - thanks for the tip!  

Jens


author: Dominic Lagger
body: Hi [@Jens](/t5/user/viewprofilepage/user-id/4104439)

The creator of the page is always shown direct underneath the title:

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

Or why do you want to get the creator? Can't you contact the confluence admin for creating this easy user macro?

Regards, Dominic

comments: author: Jens
body: Hi Dominic,  

thanks for your reply.  
In our Integrated Management System (IMS) we've some document clearings at the bottom. I want to have all the relevant information at one place in one table. The creator belongs to that and I don't want the reader to scroll up and down to get the information he wants.

Our admin will not creating this macro. As often, it is a difficult subject to get something from an admin that he himself does not see the need and that makes him work...

Jens


author: Dominic Lagger
body: Okay, I see.

I found an interessting macro:

* [Contributors Macro](https://confluence.atlassian.com/conf74/contributors-macro-1003128825.html)

Is this a possible solution for you?

Regards, Dominic


author: Jens
body: Hello Dominic,  

thanks for your help.

I'm not quite sure how it should work - there's no option for me to configure a parameter in the cheese macro.

Regards

Jens


author: Dominic Lagger
body: Hi Jens

You don't have to use the cheese macro. The cheese macro is only an example on this page. Atlassian uses the cheese macro on every macro documentation page :)

You have to use the "contributors macro".

Regards, Dominic


Tags: confluence-server

server
How to change header font size of an included page
Asked by Alper KULE:

Hello,

I have included some pages into my page.

In included pages, the headings are written in "Heading 1 " font size while I need them in "Heading 3" font size.

Is there any way to do this?


Answers:
author: Bill Bailey
body: The short answer is that you cannot change the heading levels easily, not without creating a macro to run JavaScript to change the heading sizes on page render.


Tags: confluence-server

include

server
ScriptRunner Listener to monitor Events generated by 3rd Party Plugin
Asked by Kurt Rosivatz:

Is it possible to integrate ScriptRunner's Event Listener feature with 3rd Party Plugins?

There are serveral plugins that generate custom events and publish them in the Confluence event system but these events don't seem to show up in den the Event Listener Configuration Dialog.

Is there a way to access this events in a way similar to what Adaptavist [does with their own Form Plugin?](https://scriptrunner.adaptavist.com/6.11.0/confluence/listeners.html#_creating_a_page_when_a_form_is_submitted)

Our use case is to integrate ConfiForms Events with a custom ScriptRunner script. We know that this could be achieved via ConfiForms IFTTT Web Service Rule and a ScriptRunner REST Endpoint, but the solution via events seems much more "lightweight" to us.


Answers:
author: Joshua Yamdogo @ Adaptavist
body: Hi Kurt,

I agree, this would be nice to have. Support for event listeners working with 3rd party plugins is something is definitely something we want to implement one day. We have an open issue in our backlog here: <https://productsupport.adaptavist.com/browse/SRPLAT-1339>

I'd suggest following that issue so you can receive a notification whenever there's an update regarding the development of this feature.

Regards,

Josh

Software Engineer, ScriptRunner for Confluence


Tags: com.onresolve.confluence.groovy.groovyrunner

confiforms

confluence-server

server
how do i set narrow page width for confluence server?
Asked by Meg Miranda:

we just upgraded to the current version of confluence server. We are migrating our content from Confluence Cloud and want to keep the narrow page widths.

How can i do this?


Answers:
author: Alex K
body: Hi,

Confluence Cloud and Server use different editors, and Confluence Server does not support a site-wide default for narrow page widths.

If you would like to replicate a similar look for new pages or pages you edit, you can use the "page layout" option in the editor to create a three column layout, using the middle column for the content.

![page_layout_1.png](https://community.atlassian.com/t5/image/serverpage/image-id/113990iF9030D89A8588B1F/image-size/large?v=v2&px=999 "page_layout_1.png")![page_layout_2.png](https://community.atlassian.com/t5/image/serverpage/image-id/113991iC038A0213E5B28BB/image-size/large?v=v2&px=999 "page_layout_2.png")


Tags: confluence-server

server
confluence does not start
Asked by Chandrasegaran Parassouramane:

I access to my confluence page through : http://localhost:8090/display/VOK/Vokaris

But I could not access to server.

Confluence display this page :

Couldn't lock file 'lock' in directory C:\\Program Files\\Atlassian\\Application Data\\Confluence Make sure the directory is not being used by another Confluence instance.


Answers:
author: Chandrasegaran Parassouramane
body: Hello Niranjan,

sorry for the delay.

Thank you for you great support.

My colleague noticed an other issues :

**BootstrapException: Unable to bootstrap application: Couldn't save confluence.cfg.xml to C:\\Program Files\\Atlassian\\Application Data\\Confluence directory.**

**![new conf err.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/114695i6C4D4A28FC550590/image-size/large?v=v2&px=999 "new conf err.PNG")**


author: Niranjan
body: Hi [@Chandrasegaran Parassouramane](/t5/user/viewprofilepage/user-id/4122539) ,

This could be caused by an existing Confluence process running or the previous process not being killed properly. As the previous lock is still in place, Confluence is not able to start properly.

Stop the confluence application.

Navigate to the directory in the error message.

Delete the lock file

Restart confluence.


Tags: confluence-server

server
Clearwave clarification request
Asked by Ray Rodriguez:

Is it possible to view appointments ahead of time in clearwave to check eligibility prior to the day of the patient's appointment?


Answers:
author: Mikael Sandberg
body: Hi [@Ray Rodriguez](/t5/user/viewprofilepage/user-id/4122373),

Welcome to Atlassian Community!

You should probably use Clearwave's [contact form](https://www.clearwaveinc.com/contact-us) to get in touch with someone there, my guess is that they are using Confluence and that is how you ended up on this community that is all about Atlassian products.


Tags: new-to-confluence