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

Correct sorting of notated concepts in concept info page #890

Merged
merged 6 commits into from
Feb 10, 2020

Conversation

kouralex
Copy link
Contributor

Fix #889 via introducing a space between the notation and label.

Remember to squash before merging.

@kouralex
Copy link
Contributor Author

Need to address the inadvertent side effects of this before mergeing (see Travis tests).

Copy link
Contributor

@joelit joelit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be working yet with the new sorter - e.g. on YKL page for 90.1 we get a list of following associated concepts, where clearly the class notations without a decimal get sorted after their subclass notations with decimals:

06.1 Yhdistykset. Säätiöt. Seurat. Kerhot
06.2 Museot
06.3 Näyttelyt
06.4 Arkistot
06.5 Kokoukset. Kulttuuritapahtumat
06.6 Apurahat
06.8 Lasten ja nuorten kulttuuritoiminta
06 YLEINEN KULTTUURIPOLITIIKKA
11.1 Vanhan ajan filosofia
11.2 Keskiajan filosofia
11.3 Renessanssin ja uuden ajan filosofia
11.4 Uusimman ajan filosofia
11.5 Nykyajan filosofia
11.9 Itämainen filosofia
11 FILOSOFIA
16.7 Tiedeoppi. Tieteenfilosofia
17 ETIIKKA. ELÄMÄNFILOSOFIA. ESTETIIKKA
21 USKONNONFILOSOFIA
30.12 Elämäntapojen sosiologia. Kulttuurisosiologia
49.1 Euroopan kansojen kansatiede
49.22 Rakennukset
49.24 Tekstiilit. Kansanpuvut. Korut
49.25 Elinkeinot. Työ. Työkalut
49.262 Juhlaperinne. Ruoka- ja juomaperinne
49.26 Kansantavat
49.2 Suomen ja suomalais-ugrilaisten kansojen kansatiede
49.51 Aasian kansojen kansatiede
49.52 Afrikan kansojen kansatiede
49.53 Amerikan kansojen kansatiede
49.55 Australian, Oseanian ja napamaiden kansojen kansatiede
49.5 Muiden kansojen kansatiede
49 KANSATIEDE. KULTTUURIANTROPOLOGIA
90.21 Muoti ja muodin historia
90.22 Erotiikan historia
90.2 Yleinen kulttuurihistoria
ykl:30.01
ykl:90.01

@jarmosaarikko
Copy link

The notation is a string, not a number. at leat in UDC the "decimal" period is just a visua helping mark put after every three digits and should not affect sorting at all. Other classifications may have different meanings. So when sorting according to notation, should take the string up to the first space and then sort according to that string, alphabethically. Thus "49.26" should list before "49.262" and "502/504" should become before "51" and "40.02" should be before "40.1". The last example is interesting: on the left hierarchical menu 40.02 is listed AFTER 40.1 but in the class view sublass list the 40.02 is correctly above 40.1 https://finto.fi/ykl/fi/page/40
So obviously there are two different sorting rules being used for the same notations in the same view?

@joelit
Copy link
Contributor

joelit commented Feb 6, 2020

Turned out, two independent testing environments both had insufficient configuration for this PR. The improvement requires skosmos:sortByNotation true ; to be set. Terribly sorry this improvement was left out hanging because of it!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@joelit joelit closed this Feb 6, 2020
@joelit joelit reopened this Feb 6, 2020
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kouralex kouralex merged commit bc04d43 into master Feb 10, 2020
@kouralex kouralex added this to the 2.3 milestone Feb 12, 2020
@osma osma deleted the issue889-sort-concept-info-notations branch March 12, 2020 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Values of notated concepts in concept info are incorrectly sorted
3 participants