Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't sort attribute table in composer when generating an atlas (working on 3.12.1, not 3.12.2) #36341

Closed
rbonnefoi opened this issue May 11, 2020 · 9 comments · Fixed by #37151
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks Regression Something which used to work, but doesn't anymore

Comments

@rbonnefoi
Copy link

rbonnefoi commented May 11, 2020

Hi all,

I noticed what seems to be a bug in the last 3.12.2 version.

I tried to sort a displayed attribute table in the composer but the sorting feature was absolutely without effect on some columns.

Once back to 3.12.1 version, everything worked as expected.

The table is from a csv file without geometry. At first, I used a junction with a polygon gpkg layer. Trying to investigate the problem, I tried with the csv file alone as the problem could occur because of the junction, but the problem was still the same.

You'll find enclosed the csv file (encapsulated within a zip file, as the csv type is not allowed for attached files). If you want to try to replicate the problem, display the table in the composer and try to sort it along the "ryhtme annuel log" column.

Many thanks for the help.

Remi.
donneesPLH.zip

@rbonnefoi rbonnefoi added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 11, 2020
@gioman
Copy link
Contributor

gioman commented May 11, 2020

. If you want to try to replicate the problem, display the table in the composer and try to sort it along the "ryhtme annuel log" column.

@rbonnefoi depending on how you load the CSV its columns can be loaded all as text. So if you use the expression

to_int("ryhtme annuel log")

it will order as you expect. This is at least how it works here on master after having added the CSV in QGIS by dragging it in the program main windows.

This wasn't necessary in 3.12.1? of you load the CSV in the project?

@gioman gioman added the Feedback Waiting on the submitter for answers label May 11, 2020
@Nane231
Copy link

Nane231 commented May 14, 2020

Hi,
I have the same problem with any attribute tables (with geometry) if I generate an atlas and filter the attribute table with the atlas feature. Without generating an atlas or without filtering for the atlas feature I can sort the attribute table and everything works fine, after filtering and sorting there are no more data shown in the table. It worked fine in QGIS 3.12.1, but not in 3.12.2

@rbonnefoi
Copy link
Author

rbonnefoi commented May 14, 2020 via email

@gioman
Copy link
Contributor

gioman commented May 14, 2020

: I was generating an atlas when I faced the problem

@rbonnefoi just a little detail :)

@gioman gioman changed the title Can't sort attribute table in composer (working on 3.12.1, not 3.12.2) Can't sort attribute table in composer when generating an atlas (working on 3.12.1, not 3.12.2) May 14, 2020
@gioman gioman added Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks Regression Something which used to work, but doesn't anymore and removed Feedback Waiting on the submitter for answers labels May 14, 2020
@gioman
Copy link
Contributor

gioman commented May 14, 2020

It is indeed an important thing to mention I forgot : I was generating an atlas when I faced the problem.

@rbonnefoi can you attach a sample project (but complete, with data and print composer/atlas configurations) we can use for tests? Thanks.

@gioman gioman added the Feedback Waiting on the submitter for answers label May 14, 2020
@Nane231
Copy link

Nane231 commented May 14, 2020

I know I'm not rbonnefoi - I hope I'm not too invasive... But I did a sample project with the problem. Here it is:
test_sort.zip

@gioman gioman removed the Feedback Waiting on the submitter for answers label May 14, 2020
@rbonnefoi
Copy link
Author

rbonnefoi commented May 14, 2020 via email

@Nane231
Copy link

Nane231 commented May 15, 2020

I noticed another problem wich is connected with "sorting attributes". If you want to sort (without atlas filter) a table in the composer with two fields, then it sorts first the second field and then the first field. Usually (till QGIS 3.12.1) it was the other way around. This problem is easy to solve, you only have to change the order of the sorting fields, but maybe this information helps to find a solution for the bug above? Here are screenshots to make clear what I wanted to describe:
sorting.pdf

@alexandreparente
Copy link

alexandreparente commented May 24, 2020

I have the same problem in 3.12.3 and 3.13

Test 1: QGIS version 3.12.3, filtering feature disabled

before sorting
(without filter)

Captura de tela de 2020-05-24 13-50-57

after sorting
(without filter)

Captura de tela de 2020-05-24 13-50-28

Everything worked as expected.

Test 2: QGIS version 3.12.3, filtering feature enabled

before sorting
(with filter)

Captura de tela de 2020-05-24 13-21-09

after sorting
(with filter)

Captura de tela de 2020-05-24 13-21-30

Result: The table does not show any feature.

System information

QGIS version 3.12.3-București
QGIS code revision 8234261
Compiled against Qt 5.12.8
Running against Qt 5.12.8
Compiled against GDAL/OGR 3.0.4
Running against GDAL/OGR 3.0.4
Compiled against GEOS 3.8.0-CAPI-1.13.1
Running against GEOS 3.8.0-CAPI-1.13.1
Compiled against SQLite 3.31.1
Running against SQLite 3.31.1
PostgreSQL Client Version12.2 (Ubuntu 12.2-4)
SpatiaLite Version 4.3.0a
QWT Version 6.1.4
QScintilla2 Version 2.11.2
Compiled against PROJ 6.3.1
Running against PROJ Rel. 6.3.1, February 10th, 2020
OS Version Ubuntu 20.04 LTS

Test 3: QGIS version 3.13, filtering feature enabled

before sorting

Captura de tela de 2020-05-24 12-10-09

and after sorting (with filter)

Captura de tela de 2020-05-24 12-10-51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants