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

[BUGFIX] Add sorting key to metadata #1184

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/Controller/Backend/NewTenantController.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ public function addMetadataAction(): void
$newRecord->setIsFacet((int) $values['is_facet']);
$newRecord->setIsListed((int) $values['is_listed']);
$newRecord->setIndexAutocomplete((int) $values['index_autocomplete']);
$newRecord->setSorting((int) $values['sorting']);

if (is_array($values['format'])) {
foreach ($values['format'] as $format) {
Expand Down
37 changes: 37 additions & 0 deletions Resources/Private/Data/MetadataDefaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
'is_facet' => 1,
'is_listed' => 1,
'index_autocomplete' => 0,
'sorting' => 1,
],
'title' => [
'format' => [
Expand Down Expand Up @@ -60,6 +61,7 @@
'is_facet' => 0,
'is_listed' => 1,
'index_autocomplete' => 1,
'sorting' => 2,
],
'volume' => [
'format' => [
Expand All @@ -79,6 +81,7 @@
'is_facet' => 0,
'is_listed' => 1,
'index_autocomplete' => 0,
'sorting' => 3,
],
'date' => [
'format' => [
Expand All @@ -98,6 +101,7 @@
'is_facet' => 0,
'is_listed' => 1,
'index_autocomplete' => 0,
'sorting' => 4,
],
'author' => [
'format' => [
Expand All @@ -122,6 +126,7 @@
'is_facet' => 1,
'is_listed' => 1,
'index_autocomplete' => 1,
'sorting' => 5,
],
'place' => [
'format' => [
Expand All @@ -146,6 +151,7 @@
'is_facet' => 1,
'is_listed' => 1,
'index_autocomplete' => 0,
'sorting' => 6,
],
'year' => [
'format' => [
Expand All @@ -170,6 +176,7 @@
'is_facet' => 1,
'is_listed' => 1,
'index_autocomplete' => 0,
'sorting' => 7,
],
'language' => [
'format' => [
Expand All @@ -189,6 +196,7 @@
'is_facet' => 1,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 8,
],
'collection' => [
'format' => [
Expand Down Expand Up @@ -218,6 +226,7 @@
'is_facet' => 1,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 9,
],
'owner' => [
'format' => [
Expand Down Expand Up @@ -247,6 +256,7 @@
'is_facet' => 1,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 10,
],
'purl' => [
'format' => [
Expand All @@ -271,6 +281,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 11,
],
'urn' => [
'format' => [
Expand Down Expand Up @@ -300,6 +311,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 12,
],
'opac_id' => [
'format' => [
Expand All @@ -324,6 +336,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 13,
],
'union_id' => [
'format' => [
Expand All @@ -348,6 +361,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 14,
],
'record_id' => [
'format' => [
Expand Down Expand Up @@ -377,6 +391,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 15,
],
'prod_id' => [
'format' => [
Expand Down Expand Up @@ -406,6 +421,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 16,
],
'coordinates' => [
'format' => [
Expand All @@ -425,6 +441,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 17,
],
'license' => [
'format' => [
Expand All @@ -444,6 +461,7 @@
'is_facet' => 1,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 18,
],
'terms' => [
'format' => [
Expand All @@ -463,6 +481,7 @@
'is_facet' => 1,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 19,
],
'restrictions' => [
'format' => [
Expand All @@ -482,6 +501,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 20,
],
'out_of_print' => [
'format' => [
Expand All @@ -501,6 +521,7 @@
'is_facet' => 1,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 21,
],
'rights_info' => [
'format' => [
Expand All @@ -520,6 +541,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 22,
],
'description' => [
'format' => [
Expand All @@ -539,6 +561,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 23,
],
'identifier' => [
'format' => [
Expand All @@ -558,6 +581,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 24,
],
'object_name' => [
'format' => [
Expand All @@ -577,6 +601,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 25,
],
'object_alternative_names' => [
'format' => [
Expand All @@ -596,6 +621,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 26,
],
'object_location' => [
'format' => [
Expand All @@ -615,6 +641,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 27,
],
'geonames' => [
'format' => [
Expand All @@ -634,6 +661,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 28,
],
'wikidata' => [
'format' => [
Expand All @@ -653,6 +681,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 29,
],
'wikipedia' => [
'format' => [
Expand All @@ -672,6 +701,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 30,
],
'identifier' => [
'format' => [
Expand All @@ -691,6 +721,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 31,
],
'object_name' => [
'format' => [
Expand All @@ -710,6 +741,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 32,
],
'object_alternative_names' => [
'format' => [
Expand All @@ -729,6 +761,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 33,
],
'object_location' => [
'format' => [
Expand All @@ -748,6 +781,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 34,
],
'geonames' => [
'format' => [
Expand All @@ -767,6 +801,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 35,
],
'wikidata' => [
'format' => [
Expand All @@ -786,6 +821,7 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 36,
],
'wikipedia' => [
'format' => [
Expand All @@ -805,5 +841,6 @@
'is_facet' => 0,
'is_listed' => 0,
'index_autocomplete' => 0,
'sorting' => 37,
]
];