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] Get issue title from the day if the issue itself doesn't contain correct date #1315

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beatrycze-volk
Copy link
Collaborator

Closes slub/dfg-viewer#306

Problem here is actually a bit more complicated. This fix corrects the error introduced into the METS file. The issue elements don't have correct date in the orderlabel attribute and then when casting to date happens it always cast to the first day of the given month. Previous version of kitodo had this 'fix' to correct the wrong data in file.

Example:
https://digital.slub-dresden.de/data/kitodo/TheDarea_416971482-1910/TheDarea_416971482-1910_mets.xml

<mets:div ID="uuid-5c2f6124-bbd4-4a26-a18f-e9d6842ebac3" TYPE="day" ORDER="4" ORDERLABEL="1910-01-06">
    <mets:div ID="uuid-96f00ace-c398-41e2-9fa9-b5a7b811d8e0" TYPE="issue" ORDER="1" ORDERLABEL="1910-01">
        <mets:mptr LOCTYPE="URL" xlink:href="https://digital.slub-dresden.de/data/kitodo/TheDarea_416971482-19100106/TheDarea_416971482-19100106_mets.xml"/>
    </mets:div>
</mets:div>

@sebastian-meyer @MarcMoschSLUB should we include this fix or just accept that produced data was wrong and display it as such?

@sebastian-meyer
Copy link
Member

I am not sure why the @ORDERLABEL of an issue is casted to a date in the first place. Only the @ORDERLABEL of year, month and day are supposed to be ISO 8601 dates (see METS-Anwendungsprofil, page 10: "Das Attribut ORDERLABEL der kalendarischen mets:div muss das Monats- bzw. Tagesdatum nach ISO 8601 enthalten.").

So we shouldn't cast the @ORDERLABEL of an issue to anything at all. Furthermore, the title/label of an issue should be taken from @LABEL attribute.

@beatrycze-volk
Copy link
Collaborator Author

I also don't know why it happens, but it happens.

Calendar Plugin in current form was implemented in this commit: 1acecfb

As mentioned earlier the METS file is quiet incomplete. Not only orderlabel contains incomplete date for issue but also doesn't contain label element at all. For this case label is substituted with orderlabel.

@MarcMoschSLUB
Copy link

I am d'accord with Sebastian. This is a data issue which has to be fixed on production side.

@andre-hohmann
Copy link

andre-hohmann commented Aug 30, 2024

This behavior of missing LABEL attribute of issues is discussed in the context of Kitodo.Production, too:

Just FYI and to link the issues to create an overall picture and the impact.

@andre-hohmann
Copy link

The following two aspects should be regarded separately:

  1. Incorrect ORDERLABEL to describe the newspaper issues
  2. Missing LABEL information of the subordinate processes in superordinate processes and the former fix of Kitodo.Presentation to retrieve it from the subordinate process

Regarding aspect 1:
A correction of the data is necessary. This might affect only a few institutions - the ones who migrated newspaper issues from Kitodo.Production 2 to Kitodo.Production 3.
Possible reasons are analysed in:

Regarding aspect 2:
Other hierarchical processes are also affected, such as periodical processes. Regardless of the incorrect data of aspect 1. This could affect several institutions.

This is being discussed in:

@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] The issues in the calendar view and the table of content have wrong labels
4 participants