youngmon/atlassian-qna huggingface dataset:
How to Concatenate two variable in Velocity Code
Asked by Suresh Venkat:

I am creating a User Macro in Confluence using Velocity Code. Need to concatenate two variables

using below code

##set($listofContent = $labelManager.getCurrentContentForLabelAndSpace() )

## set($labelManager = $action.getLabelManager() )

##set($label = $labelManager.getLabel() )

##set($newLabel = "")

##set($oldLabel = "")

#foreach ($labelling in $page.getLabellings () )

#set ($label = $labelling.getLabel() )

#set ($oldLabel = $label)

##here I would like to concatenate Old Label + New Label, so that I can get all labels

##below command is not working

#set ($newLabel = $oldLabel$newLabel)

## where am I going wrong?

#end


Answers:
author: Bill Bailey
body: Well straight concatenation would just be

#set ($newLabel = $oldLabel + $newLabel)

But if $oldLabel = "foo" and $newLabel = "bar", then the result will be foobar. So if you want some sort of delimiter, then you need to do something like this:

#set ($newLabel = $oldLabel + ', ' + $newLabel)

to result in foo, bar

comments: author: Suresh Venkat
body: [@Bill Bailey](/t5/user/viewprofilepage/user-id/502089) : While old label prints the latest label on a page, newlabel would simply print $newLabel as the value of label, with both the options provided.

I tried setting the initial values as

##set($newLabel = ' ')

##set($oldLabel = ' ' )

That did not help either. Referred and implemented from this link [http://people.apache.org/\~henning/velocity/html/ch09s05.html](http://people.apache.org/~henning/velocity/html/ch09s05.html). Still no avail.


author: Bill Bailey
body: You do realize that ## is the syntax for a comment, so those lines will not operate?

I would also suggest looking at the latest guide:

<http://velocity.apache.org/engine/2.2/user-guide.html#string-concatenation>

It suggest using

#set ($newLabel = $oldLabel$newLabel)

But I have typically used the + operation as I often need to mix in HTML code. Either should work.

It has been awhile since I worked with labels, but you may have to convert the object to a string one of two ways:

$label.toString()

or

$label.name


author: Suresh Venkat
body: Ok. will have to reach out to dev@velocity.apache.org, as trying all options has not worked. FYI, without converting oldLabel is printing the latest label as it is. Hence..

But, Thanks for offering the advice


author: Bill Bailey
body: Also, I don't think I have seen a method .getLabellings () (note that there should not be space between the method and () ).

The method I have always used was .getLabels()


author: Suresh Venkat
body: [@Bill Bailey](/t5/user/viewprofilepage/user-id/502089) Space was a typo. I referred example given at <https://community.atlassian.com/t5/Confluence-questions/How-do-I-list-all-pages-with-titles-and-last-modified-by-and/qaq-p/41974>. getLabel is working.


author: Bill Bailey
body: Yeah, that article is from 2015 so I think version 5. It may be that .getlabellings() was deprecated, or a method added by another plugin?


Tags: atl-gruland

confluence-server

server

velocity
Trying to index a numbered list with header styles
Asked by Robert Harris:

I have a list of items I'm documenting and I want to use H2-H4 to make it readable to users. I want a table of contents though so I have:

\</table\>

1 \<h2\>Item 1

a \<h3\> detail 1

b \<h3\> detail 2

c \<h3\> detail 3

2 \<h2\>Item 1

a \<h3\> detail 1

b \<h3\> detail 2

But, if I have a numbered list such as the "Item 1" I can't put a header style on it, it's gray'd out. If I make it:

\<h2\>Item 1

1 \<h3\> detail 1

2 \<h3\> detail 2

3 \<h3\> detail 3

\<h2\>Item 1

1 \<h3\> detail 1

2 \<h3\> detail 2

then I can put a header style on Item 1 and Item 2, But our style is the first.


Answers:
author: Hana Ku?erov?
body: Hi [@Robert Harris](/t5/user/viewprofilepage/user-id/4203562),

welcome to the Atlassian Community!

I would recommend you to use [table of contents macro](https://support.atlassian.com/confluence-cloud/docs/insert-the-table-of-contents-macro/) instead of create it manually. It will generate your TOC automatically based on the contents of the page and there are a lot of customizations available.

comments: author: Ryan Wise
body: Yes, but the ToC macro ***won't let you add headings to lists*.** Robert is encountering the same issue that I am. He's trying to create a workaround. What customization would allow adding headings to lists or adding parts of a list to a ToC. I'm not seeing it.


Tags: cloud

confluence-cloud
Upgrading from Confluence 6.15.2 to 7.10 and getting an error on update of index
Asked by Marcus Moreno:

I am upgrading Confluence version 6.15.2 which is hosted on CentOS and has a backend database running MySQL 5.6. We attempted upgrading from Confluence 6.15.2 to 7.10.0. We ran into an issue updating the index.

Here are the related log entries:

Upgrade failed. Please consult the system logs for details. You will need to fix these problems, restore your database and confluence home directory to the pre upgrade state. Then retry the upgrade. Upgrade error message: Upgrade task [com.atlassian.confluence.upgrade.upgradetask.SplitIndexUpgradeTask@1ad30825](mailto:com.atlassian.confluence.upgrade.upgradetask.SplitIndexUpgradeTask@1ad30825) failed during the UPGRADE phase due to: Failed to read id for journal 'main_index': null; nested exception is java.lang.NumberFormatException: null

2020-12-23 02:51:28,751 ERROR \[Catalina-utility-1\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] launchUpgrades Upgrade failed, application will not start: Upgrade task [com.atlassian.confluence.upgrade.upgradetask.SplitIndexUpgradeTask@7e273617](mailto:com.atlassian.confluence.upgrade.upgradetask.SplitIndexUpgradeTask@7e273617) failed during the UPGRADE phase due to: Failed to read id for journal 'main_index': null; nested exception is java.lang.NumberFormatException: null


Answers:
author: Nic Brough -Adaptavist-
body: I think your index is corrupt, and the only fix I know of for that is to throw it away and rebuild it from scratch.

I would

* Go to the original 6.15.2 install
* Shut it down
* Move all the files and directories from \<confluence home\>/journal/ to a backup location
* Start Confluence
* Ignore that your home page looks forlorn and wrong
* Go to Admin -\> Index and rebuild the index
* Now re-try the upgrade


Tags: confluence-server

server

upgrade
Migration from embedded HSQL database to MySQL
Asked by John McAlpin:

I have a completely functional Confluence Server system with quite a bit of data and attachments. I would like Confluence to point to a local MySQL database (already installed and configured) rather than the current HSQL database. The articles that I've found talk about setting this during initial installation. How can I point Confluence to MySQL now that I've been up and running a year or so?


Answers:
author: Nic Brough -Adaptavist-
body: You can edit the confluence.cfg.xml file in the home directory to swap over, but a lot of the stuff in it is quite obscure and it would be a very good idea to work from an example copy.

An easy cheat would be to run an install of a new system (on the same version) and configure it for your new MySQL database, let it get to the point where you can log in, then stop it and then you'll be able to do a direct comparison on a MySQL vs H2 config files and pretty much copy and paste all the settings into the existing ones.

comments: author: John McAlpin
body: This is really beating me up. I found a good xml from a previous Confluence/MySQL installation and tried numerous permutations on the XML without success.

Below are the differences I detected in "/var/atlassian/application-data/confluence/confluence.cfg.xml". Other than the id, licenses and keys of course. It just won't start. I go back to the original XML and it's fine (on H2).

Remove...

\<setupType\>install\</setupType\>  
\<buildNumber\>8505\</buildNumber\>  
\<property name="hibernate.connection.driver_class"\>org.h2.Driver\</property\>  
\<property name="hibernate.dialect"\>com.atlassian.confluence.impl.hibernate.dialect.H2V4200Dialect\</property\>

Add...

\<setupType\>custom\</setupType\>  
\<buildNumber\>8506\</buildNumber\>  
\<property name="hibernate.c3p0.preferredTestQuery"\>select 1\</property\>  
\<property name="hibernate.connection.driver_class"\>com.mysql.jdbc.Driver\</property\>  
\<property name="hibernate.connection.url"\>jdbc:mysql://127.0.0.1:3306/Confluence\</property\>  
\<property name="hibernate.dialect"\>com.atlassian.confluence.impl.hibernate.dialect.MySQLDialect\</property\>


author: Daniel Ebers
body: For a MySQL setup a driver must be downloaded separately and put into filesystem.  
Maybe this is already the obstacle.

Is there anything visible from logs as for the details when you say "it just don't start"?


Tags: confluence-server

server
Jira issues macro won't load issues for space viewers
Asked by Blanca:

Space and Global restrictions have been set to allow the external customers to access the page but the issues don't show up on the Jira issue list macro.

I'm not sure if I'm missing a step as I can't find more information on the Knowledge base.

Thanks!


Answers:
author: Ollie Guan
body: Hi [@Blanca](/t5/user/viewprofilepage/user-id/3758631) ,

In addition to Confluence access, do these external customers have access to projects in Jira?

Otherwise, I don't think they can see the Jira Issues list.

comments: author: Blanca
body: [@Ollie Guan](/t5/user/viewprofilepage/user-id/853638), Thanks!


Tags: cloud

confluence-cloud

permission
How to insert a newly created page in alphabetic order
Asked by Oliver L?tte:

Hello,

I have a question how newly created pages are inserted into the current set of pages.

Let's say I have a space with pages and subpages. Whenever I want to create a page below a subpage, it is added at the end within the subpage.

E.g. there is a page "Fruits" with a subpage "Bananas". When I add a second page "Ananas" the output looks like that:

* Fruits
* - Bananas
* - Ananas

Neither makes that sense nor is it the expected result. Imagine your file drive would work that way...

I know: I can go to the space admin page and sort the pages. But that is impractical. I create dozens of pages - maybe even in a week. And I am supposed to do that each time? No way...

Why is there not a default setting to customize how new pages are inserted. I think this is the most trivial thing

Apart from that your product is brilliant :)

Regards

Oliver


Answers:
author: Nic Brough -Adaptavist-
body: There's no setting for this. The ordering of pages within the tree is free-form and you could have any one of thousands of desired default ordering patterns. Most people wouldn't want alphabetic. Some find "order that they're added" useful.

If you coded for a default scheme, you'd need to code a way to support all the popular ones otherwise you'd only be coding for a tiny fraction of your user base.

Atlassian went with the most simple to code for which is "add to the end of the list". It looks like "order they were added", but technically, it isn't, there's no looking at dates or comparing things, it's just a line of code that appends to a list.

comments: author: Oliver L?tte
body: Thanks for the clarification. I marked the question as answered.

A few thoughts though: I worked with two on-premise versions of Confluence (one four years back, one at the moment). In both cases new pages are inserted in alphabetical order... That's why I "searched" for that feature in the cloud version. So somewhere at Atlassian the algorithms seem to be available.

Secondly having an ordering feature which covers a handful of options initially (sorry, I have to disagree with "thousands") could cover a majority of the user base. And even if it does not, more options could be added over time (just like the templates which are getting more and more over time).

Therefore I would appreciate such a feature in the future - maybe someone from Atlassian is seeing this ;-)


author: Rob Horan
body: I'm having the same problem. I'm adding notes to a space I created for an online class and I'm doing some pages out of order, and this is driving me nuts, especially since this is inconsistent with server.

You can alpha sort by reordering pages in your space settings.

The downside is you'll need to do this EVERY TIME you add content.

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


Tags: cloud

confluence-cloud
Repeated installation of Companion App required
Asked by Babiel GmbH:

Hello,

for editing page attachments (such as Excel files) in Confluence, the problem occurs that the Atlassian Companion App has to be downloaded and installed again and again.

What are the options to ensure that the installation is permanent and does not have to be repeated by users on a regular basis?

Various re-installations have unfortunately not led to success so far and we have no more idea what the problem could be.

Kind regards

Michael


Answers:
author: Alex K
body: Hi [@Babiel GmbH](/t5/user/viewprofilepage/user-id/741906) ,

Why is the installation not persisting? Is the Local AppData directory being cleared?

You could try [installing the .msi variant](https://confluence.atlassian.com/doc/administering-the-atlassian-companion-app-958456281.html#AdministeringtheAtlassianCompanionApp-InstalltheCompanionappviaMicrosoftInstaller(MSI)) of Atlassian Companion which installs to Program Files.

Regards,  
Alex K

comments: author: Babiel GmbH
body: Hello Alex,

thank you for your suggestions. However, we have already carried out these two measures several times without lasting success. At the moment we have no idea what the reason could be.

Regards

Michael


Tags: confluence-server

server
Connecting an external HR Software to confluence data
Asked by Rico Fernando:

Hi Guys,

I have a basic question. We are an HR Software and would like to cooperate with companies using confluence.

Is the API token enough or would we have to create another type of API?

Thanks a lot and I wish you all Merry Christmas and take care of yourself.

cheers

Rico


Answers:
author: Evangelos Mantadakis
body: hi, [@Rico Fernando](/t5/user/viewprofilepage/user-id/4203237) This is Evangelos from QC Analytics, and welcome!

There are different options available and it depends on what you are trying to achieve. Roughly what you are trying to achieve with the integration?

Best,

Evangelos

comments: author: Rico Fernando
body: Wow that was fast :-) Thanks for the fast answer!!

There are various scenarios we wanna create but just as one example:

We created a Goals-System to make usage of OKR e.g. easier. So if you create a tasklist with mother and child items we would like to gather those fields and create Challenges (our name for goals) out of it. Then you can use those to easily plan your tasks as goals and see the progress as well as all the company sees what you are working on and the connection of those goals to the company goals for example.

Does this explain it better for you?

Cheers

Rico


author: Anand Inamdar_Amoeboids
body: [@Rico Fernando](/t5/user/viewprofilepage/user-id/4203237) you will have to build a Confluence app that can be made available to your target customers via the [Atlassian marketplace](http://marketplace.atlassian.com/). (If I understood you correctly). You can just search for HR/OKR in the marketplace \& see the existing apps in that domain.

Best,  
Anand

comments: author: Rico Fernando
body: hi, thanks for the fast answer!!

Really? i have to build an app? Just to explain it.. this will be one of possible scenarios:

We created a Goals-System to make usage of OKR e.g. easier. So if you create a tasklist with mother and child items we would like to gather those fields and create Challenges (our name for goals) out of it. Then you can use those to easily plan your tasks as goals and see the progress as well as all the company sees what you are working on and the connection of those goals to the company goals for example.

Does this explain it better for you?

cheers

Rico


author: Anand Inamdar_Amoeboids
body: [@Rico Fernando](/t5/user/viewprofilepage/user-id/4203237) I am not sure I understand your scenario, but you mentioned you are an 'HR software' company. So I guess you want teams that are already using Confluence to be able to integrate with your 'HR software' product, right?

If yes, they (teams that are on Confluence) have got two options

1. Integrate Confluence with your 'HR software' to push/pull the data via your product's REST APIs
2. You create an app on Confluence that is kind of plug n play, where end users can simply connect Confluence to your 'HR software' and push/pull the desired information

Hope that is clear.


author: Rico Fernando
body: hi, yes, that was it exactly. and that helps a lot. Thx.


Tags: atl-gruland

confluence-cloud
@Group mention does nor refresh when the member has been changed
Asked by PWER:

I think the feature to mention groups instead of peoples is really cool. Confluence list all group members behind the mention. Unfortunately the member list in the mention will be not refreshed when they will changed in the group. Is that a bug or feature?


Answers:
author: Brant Schroeder
body: Welcome to the community. I believe it retains who the mention went to. When you change the group and do a mention and you have users 1,2,3,4,5 in the group then this is save so when you go back you see the mention went to those users. If you update the group so it is now 1,2,3 and do another mention then it will show 1,2,3 in that mention and the old mention will still have 1,2,3,4,5 because that is who it went to.

comments: author: PWER
body: Thank you for your answer.

For protocols it seems a feature. But for a documentation where i want to see the actual people in a project it is maybe a bug.


Tags: cloud

confluence-cloud

mention

refresh
Looking for trello developer to create an add-on for me....
Asked by @CoachFusco:

I want to be able to click a button on the right column under "Add" and display an image similar to the attached (soccer lineup tactics board) - edit it as needed - and save it to this card.

This would allow me to edit the team player listing and drag and drop players to the field.

The field could be toggled to different "field views"

Also attached 'Member Player Icons.png" is a sample of how I envision the players icon looking - using the trello member icons as the symbol with the option to toggle between picture, position, number, \& name. \*And the ability to change colours of icons.

It would also be great to have some annotation ability to draw or comment on the board if needed. I have attached "symbology image" of a sample set of drag and drop icons to be added to the board as well.

![TacticsBoard.PNG](/t5/image/serverpage/image-id/3631iAECBDBAF54496F98/image-size/large?v=v2&px=999 "TacticsBoard.PNG")![IMG_0273.PNG](/t5/image/serverpage/image-id/3630i7043829906997CD7/image-size/large?v=v2&px=999 "IMG_0273.PNG")![IMG_0270.PNG](/t5/image/serverpage/image-id/3629iEAE39F3BBEAE607D/image-size/large?v=v2&px=999 "IMG_0270.PNG")


Answers:
author: Marta Galofre de Alos
body: Hey there!  

Thanks so much for your patience on this! We don't have any specific engineers that we recommend for working on Trello projects, though that's a great idea! Because we don't have anyone specific to recommend, we'll leave this here just to see if there are any takers. Does that sound alright with you? Sorry that we can't be of more help here.
Will a Trello checklist pass an HR audit?
Asked by Jenni:

We currently use Sharepoint to store new employee checklists. People from different departments have different responsibilities when someone new is hired. I'm interested in moving that process to Trello. Our initial idea was to create a Board for each new hire, cards for each department, and checklists on those cards to cover each responsibility.

1. Can the contents of a checklist be edited by everyone who has access to the list? I'd like to be able to lock down the description of each checklist item, but have other users be able to check off boxes for tasks that are complete.

2. Will an archived or exported Trello board meet audit requirements when we need to show due diligence in hiring processes?

3. Does anyone have a suggestion for a different approach?


Answers:
author: Marta Galofre de Alos
body: Hi,

Thanks for your questions!

1. Currently, anyone who's a member of a board will be able to make changes in the boards and edit its cards. Therefore, they will be able to change descriptions, add attachments, edit comments and checklists, etc. If you want to prevent any kind of edition on your boards, you can [add people as Observers](http://help.trello.com/article/732-adding-observers-to-boards) to your boards.

2. We can't advise on that matter without knowing what the requirements are. You could reach out to support@trello.com so we can send you our security documents. Then, you'll be able to assess that with your lawyer team.

Thanks!

Marta, Trello Support
Prioritizing cards by day?
Asked by Will Morrison:

I see how I can prioritize cards within a Board.

But I am not seeing how I can prioritize cards in the context of a timeframe; e.g. tomorrow; or even without a timeframe; e.g list all cards and then prioritize them.

Any tips?

Thx


Answers:
author: Marta Galofre de Alos
body: Hi Will,

You can use different features to prioritize your cards. You can create labels on your boards and add them to your cards to determine the level of priority: [Adding labels to cards](http://help.trello.com/article/797-adding-labels-to-cards)  

Another way of determining the relevance of cards might be by adding due dates---the one which is more urgent will be due sooner. Here's more information on that: [Adding due dates to cards](http://help.trello.com/article/794-adding-due-dates-to-cards)  

To have an overview of all your cards, you can click on your avatar on the top right side of your dashboard and go to "Cards". You can then sort them by board or due date, so you know which ones are more important.  

Marta, Trello Support


Tags: priority
Is it possible to invite people to one card without having them see my entire board? How?
Asked by Nancy Movall:

I would like to add a person to one card that is specific to the work she and I are doing together, but she is outside my agency so do not need her to see my entire board. -only one card that involves her.

Thank you!


Answers:
author: Matthew N
body: Hey Nancy!

With Trello, permissions are board specific. At this time, Trello is not able to offer card specific permissions. This is a feature request that has been received, so hopefully this can be implemented in the near future.

For the time being, you'll need to have separate boards for privacy.

comments: author: Janine Kelbach
body: Has their been an update for this yet? I am having the same issue.