Sort functionality for tables in edit mode
Asked by Rick Breidenstein:

Current v4.3.2; we are in the process of upgrading to v5.5

While viewing a page with a table you can click on the column headers and it will sort it, but this doesn't carry over into edit mode. As you continue to build out the table it is difficult to manage the table if you cannot sort the content while in edit mode.

Is there a way to accomplish this? Is this a feature available in v5.5?

Bringing you into this :smile: @Andrew Pawl


Answers:
author: Rick Breidenstein
body: Link to new feature request: <https://jira.atlassian.com/browse/CONF-29816>

The issue is this request is marked "resolved" "will not fix". I commented and started watching it anyways. Maybe if we all comment and get enough people behind use they can reconsider.

I was hoping this would be in the upcoming release announced at the summit this year with its enhancements to editing, but I guess not Sad :(

comments: author: Steven F Behnke
body: It might be worth investigating a new plugin if they are going to ignore the obvious need for in-editor sorting.


author: Rick Breidenstein
body: I agree. I'm going to start looking. Let me know if you happen to come across one.


author: Steven F Behnke
body: I was going to see if I can mock something up in speakeasy. I was hoping I could give some resources to our dev and he could whip something up. I will of course update if anything comes from this because not being able to sort content in confluence is lame.


author: pgluck
body: There is a workaround for this capability:

1. View your table normally
2. Sort the table as desired using the column sort capability.
3. Select the table contents and copy to your clipboard.
4. Change to edit mode.
5. Select the table contents and paste from your clipboard.

This worked for me with a simple text table.


author: Rodrigo Girardi Adami
body: Hi Rick,

I believe this is not possible at the moment so I've created a improvement request for you here: <https://jira.atlassian.com/browse/CONF-35079>

I recommend to vote and ask your colleagues to vote as well to increase the ticket popularity.

I hope this helps.

Cheers,

Rodrigo

comments: author: Steven F Behnke
body: definitely going to vote for this myself.


author: Andrey Khaneev _StiltSoft_
body: It possible to sort and filter table in editor if you use [Table Filter](https://marketplace.atlassian.com/plugins/com.stiltsoft.confluence.plugin.tablefilter.tablefilter/server/overview) macro: put a table inside the macro and sort this table with Ctrl+Click on table header. And works well with editing a table, adding and removing rows and columns, etc.

Additionaly you can configure [default sorting](https://docs.stiltsoft.com/display/TableFilter/Managing+Look+of+the+Table+and+Filtration+Pane#ManagingLookoftheTableandFiltrationPane-Applyingthedefaultsortingordertocolumns) on one or multiple columns.

comments: author: George Parsons
body: I am trialing the Table Filter macro to get better editing capabilities for Tables in Confluence. I can't get the \<ctrl+click\> to work. I am using the Cloud instance of Confluence and your macro. Any tricks to get the sorting to work while in edit mode?


author: Andrey Khaneev _StiltSoft_
body: Hello George,

Unfortunately, table sorting by Ctrl+Click in the page editor is not available for Confluence Cloud, it is available for Confluence Server and Datacenter.


author: Alex N
body: Just wondering. How do you guys imagine sorting the table while the content is being changed on the fly? What content should be sorted then? Only a selected column separately or the whole table? And what should happen after entering a new row or editing an existing row, which already participates in sorting logic? Well, I guess guys from Atlassian could code something, but usability of such a table could be an issue.

Just an opinion.

comments: author: Don E Farley II
body: It should work the same way a table works in Word. You can sort any column, or multiple columns. The fact that the document is being "changed on the fly" is irrelevant. Resorting the table is incredibly easy in Word. Same should be true here also.

Minimally, even if you can sort in Edit in Confluence, you should at least be able to save the sorted table. Right now, you can sort it when it's NOT in Edit mode, but the sort is not saved, so it becomes useless. Once you've sorted the table, you should have the option of saving it sorted, or discarding the sort -- which is what happens now automatically. This is extremely frustrating and reflects very badly on the usability of the tables. Whomever is developing them obviously never actually uses them in real-world situations.


author: Rodrigo Girardi Adami
body: Just to add this information. I've tested on the latest confluence 5.6.3 and this feature is not available up to this version of the application.