Skip to content

Fix language and licence selection in EventDetails tab#1479

Merged
jduehring merged 2 commits intoopencast:r/18.xfrom
jduehring:fix-language-licence-selection-18
Nov 28, 2025
Merged

Fix language and licence selection in EventDetails tab#1479
jduehring merged 2 commits intoopencast:r/18.xfrom
jduehring:fix-language-licence-selection-18

Conversation

@jduehring
Copy link
Contributor

Fixes #1471 .

I think in #1375 the options field for non series fields has been missed and wasn't parsed at all. This resulted in no language or licence options showing up in the dropdown.

This patch reintroduces the parsing of the options for those fields.

How to test this patch

With the patch installed, open the event details / new event tab and check if you can see and select language, licence and series options in the dropdown selection.

@jduehring jduehring added the type:bug Something isn't working label Nov 19, 2025
@github-actions
Copy link
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1479

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-1479

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

@github-actions
Copy link
Contributor

This pull request is deployed at test.admin-interface.opencast.org/1479/2025-11-19_11-47-04/ .
It might take a few minutes for it to become available.

Copy link
Contributor

@owi92 owi92 left a comment

Choose a reason for hiding this comment

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

This works and can be merged now.

There is still an issue where the dropdown for the language field shows the languages in the currently selected UI language but the filtering is happening based on the english word.
I.e. if the Admin UI is set to german, the dropdown shows the "german" option as "Deutsch", but typing "de" won't produce any suggestion. You still need to type "ge" to get the "Deutsch" option. But I'd suggest that should be fixed in another PR.

Comment on lines +232 to +240
options={
metadataField.collection
? metadataField.collection.map(item => ({
label: item.label ?? item.name,
value: item.value,
order: item.order,
}))
: []
}
Copy link
Contributor

@owi92 owi92 Nov 19, 2025

Choose a reason for hiding this comment

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

you can also do

Suggested change
options={
metadataField.collection
? metadataField.collection.map(item => ({
label: item.label ?? item.name,
value: item.value,
order: item.order,
}))
: []
}
options={metadataField.collection?.map(option => ({
...option,
label: option.label ?? option.name,
}))}

but it's functionally equivalent, so not super necessary to change.

@jduehring jduehring merged commit 063a44b into opencast:r/18.x Nov 28, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants