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

Split presenters at ";" #1104

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Arnei
Copy link
Member

@Arnei Arnei commented Feb 4, 2025

It was brought to my attention that this was a feature in the previous admin ui, so this patch adds it back in.

When adding multiple presenters to an event in the metadata tab, you can now add multiple presenters at the same time by delimiting them with a ";". For example, writing "Pacman; Duck Hunt" would result in both "Pacman" and "Duck Hunt" being added as presenters. Will also work for other metadata fields that work the same way, e.g. contributers.

EDIT: With the lastest commit, the delimiter is not ";", but instead specified in the metadata catalog configuration (where all metadata catalog fields are specified). If no delimiter is specified, no splitting will take place.

How to test this

Can be tested as usual.

It was brought to my attention that this was a feature in the
previous admin ui,
so this patch adds it back in.

When adding multiple presenters to an event in the
metadata tab,
you can now add multiple presenters at the same time by delimiting
them with a ";". For example, writing "Pacman; Duck Hunt" would result
in both "Pacman" and "Duck Hunt" being added as presenters.
Will also work for other metadata fields that work the same way,
e.g. contributers.
@Arnei Arnei added the type:enhancement New feature or request label Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

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-1104

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-1104

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.

Copy link
Contributor

github-actions bot commented Feb 4, 2025

This pull request is deployed at test.admin-interface.opencast.org/1104/2025-02-07_09-13-13/ .
It might take a few minutes for it to become available.

@wsmirnow wsmirnow self-assigned this Feb 6, 2025
@wsmirnow
Copy link
Contributor

wsmirnow commented Feb 6, 2025

This patch enable splitting value by an ; on all metadata fields. It does not read the metadata catalog configuration property.{field-id}.delimiter value like documented in https://docs.opencast.org/r/17.x/admin/#configuration/metadata/ The side effect is, you can't use ; any more in any metadata field in Opencast.

@wsmirnow
Copy link
Contributor

wsmirnow commented Feb 6, 2025

The delimiter configuration value will be parsed by Opencast backend and provided by metadata endpoints liek /admin-ng/event/new/metadata, /admin-ng/event/EVENTID/metadata.json, …. Example:

[
    {
        "flavor": "dublincore\/episode",
        "title": "EVENTS.EVENTS.DETAILS.CATALOG.EPISODE",
        "fields": [
            {
                "readOnly": false,
                "id": "title",
                "label": "EVENTS.EVENTS.DETAILS.METADATA.TITLE",
                "type": "text",
                "value": "",
                "required": true
            },
            {
                "delimiter": ";",
                "readOnly": false,
                "id": "contributor",
                "label": "EVENTS.EVENTS.DETAILS.METADATA.CONTRIBUTORS",
                "type": "mixed_text",
                "value": [],
                "required": false
            }
        ]
    }
]

@Arnei
Copy link
Member Author

Arnei commented Feb 7, 2025

This patch enable splitting value by an ; on all metadata fields.

I cannot reproduce that. As far as I can tell this really only affects metadata fields of the mixed_text type, which are "presenters" and "contributors" in the common event catalog. Can you describe in more details what is happening with the other metadata fields, any errors?

Bildschirmaufzeichnung.vom.2025-02-07.09-16-51.webm

It does not read the metadata catalog configuration property.{field-id}.delimiter value like documented in https://docs.opencast.org/r/17.x/admin/#configuration/metadata/

I was not aware that this was configurable, thanks for telling me! I will make sure the new admin ui respects the configuration.

Apparently the delimiter for mixed_text fields is not supposed
to be hardcoded as ";", but is actually specified in the metadata
catalog configuration. As such, this patch fixes the previous commit
in that the delimiter is now respected (and in case
no delimiter is specified, no splitting is happening).
@Arnei Arnei force-pushed the split-presenters-at-semicolon branch from 300de36 to 80aac56 Compare February 7, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants