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

DSpace 7: Behaviour of orange warning icon / red error icon during submission #2572

Open
f-rapp opened this issue Oct 25, 2023 · 6 comments
Open

Comments

@f-rapp
Copy link

f-rapp commented Oct 25, 2023

Describe the bug
Submission forms: There are sections where all mandatory fields have values, however there is an orange or a red icon showing that something is wrong with the section.

  1. It is not clear why the icon is sometimes orange and sometimes red. When is there an orange warning, when a red error?
  2. Also, is it possible that the icon display ignores the type-bind function and generally checks all(!) mandatory fields? I could not test this on the demo, but in our installation we have sections with type-bind fields. Even though the mandatory fields for the chosen dc.type all have values, there still is an orange or red icon.

To Reproduce
Steps to reproduce the behavior:

  1. Create sections with mandatory type-bind fields.
  2. Choose a dc.type value that is not present in the mandatory type-bind fields.
  3. Save and check the icon on that section.

Expected behavior
The orange and red icons should behave consistently and be self-explanatory.

Related work

@f-rapp f-rapp added bug needs triage New issue needs triage and/or scheduling labels Oct 25, 2023
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Oct 25, 2023
@tdonohue
Copy link
Member

This needs more information on how to reproduce the issue. For example, an example configuration or screenshots or similar. It's unclear to me what is being reported.

Generally, the red status means that the form is showing an error, while yellow/orange is a warning that required information is not yet completed in that section. The yellow/orange should change to green when required info is added to the section. The yellow/orange should change to red if you attempt to submit/save the form without filling out the required data.

  • green = required metadata filled out in this section
  • yellow/orange = warning you that required metadata is not yet completed in this section.
  • red = an error is being displayed in this section. It might be that required metadata is missing, or metadata is invalid in some way. The field with the error should be highlighted in red.

This might be related to DSpace/DSpace#8969

Needs more information on how to reproduce.

@tdonohue tdonohue moved this from 🆕 Triage to ❓ Needs Info in DSpace Backlog Oct 25, 2023
@mirkoscherf
Copy link
Contributor

An example, which should describe the issue:

<form name="page1">
            <row>
                <field>
                    <dc-schema>jgu</dc-schema>
                    <dc-element>type</dc-element>
                    <dc-qualifier>version</dc-qualifier>
                    <label>Version</label>
                    <input-type value-pairs-name="typeversion">dropdown</input-type>
                    <hint>If your publication has been published or publicly distributed before,
                        please choose "published version" (the publisher's edited version) or
                        "accepted version" (author's reviewed version), or else choose "original
                        work".</hint>
                    <required>The field "Version" must be completed.</required>
                </field>
            </row>
            <row>
                <field>
                    <dc-schema>dc</dc-schema>
                    <dc-element>type</dc-element>
                    <repeatable>false</repeatable>
                    <label>Document type</label>
                    <input-type value-pairs-name="openaccess_jgu_publikationen_types">dropdown</input-type>
                    <hint />
                    <required>The field "Document type" must be completed.</required>
                </field>
            </row>
            <row>
                <field>
                    <dc-schema>dc</dc-schema>
                    <dc-element>language</dc-element>
                    <dc-qualifier>iso</dc-qualifier>
                    <repeatable>false</repeatable>
                    <label>Language</label>
                    <input-type value-pairs-name="iso_639-2_languages">dropdown</input-type>
                    <hint />
                    <required>The field "Language" must be completed.</required>
                </field>
            </row>
            <row>
                <field>
                    <dc-schema>jgu</dc-schema>
                    <dc-element>type</dc-element>
                    <dc-qualifier>resource</dc-qualifier>
                    <label>Type of resource</label>
                    <input-type value-pairs-name="resourcetype">dropdown</input-type>
                    <hint>Please select the resource type which mostly characterizes your
                        publication, e.g. "Text" for dissertations.</hint>
                    <required>The field "Type of resource" must be completed.</required>
                </field>
            </row>
        </form>

NB: we do not use type-bind in this form but the dc.type is used for requirements in the following forms of the item submission.

The behavior if this form is as follows:
If some but not all fields are filled out, the red icon appears as expected when pressing the deposit button.
image

If all fields are filled out (but required fields in other forms are missing, thus preventing a successful deposit), a yellow/orange warning sign appears when pressing the deposit button.
image
This should show a green icon here, as all form fields are displayed and filled out.

If I refresh the page with F5, the icon changes to green (displaying expected behavior)
image

@tdonohue
Copy link
Member

tdonohue commented Nov 6, 2023

Based on the description above, this sounds similar to DSpace/DSpace#8969 and DSpace/DSpace#8972. It sounds like these status icons are just getting cached in several scenarios and do not update automatically. I'll pull this ticket over to the 7.6.x maintenance board in search of a volunteer. It's possible that one fix could solve all three of these issues.

@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward configuration medium priority and removed needs triage New issue needs triage and/or scheduling labels Nov 6, 2023
@tdonohue tdonohue removed this from DSpace Backlog Nov 6, 2023
@mirkoscherf
Copy link
Contributor

Regarding @f-rapp 's second point, we also face the problem, that forms with type-bind related rows display the yellow/orange warning sign even if all required fields (and even if all fields) are filled out. This won't change to a green icon when refreshing, so there seems to be a second problem causing this behavior.
I'm still investigating but might be able to provide a PR for this part if I can determine the problem's origin.

@f-rapp
Copy link
Author

f-rapp commented Nov 7, 2023

Here is an example:

Even though there are no open mandatory fields, the icon is orange and a refresh doesn't change that.

grafik

There are mandatory fields with type-bind:

`


uulm
typeDCMI

true
Medientyp (DCMI-Standard)
dropdown
Auswahlhilfe Medientyp https://oparu.uni-ulm.de/xmlui/resourcetypes.
Pflichtfeld

        <row>
            <field>
                <dc-schema>dc</dc-schema>
                <dc-element>date</dc-element>
				<dc-qualifier>created</dc-qualifier>
                <repeatable>false</repeatable>
                <label>Jahr der Fertigstellung</label>
                <input-type>onebox</input-type>
                <hint>Jahr, in dem die Arbeit inhaltlich fertiggestellt wurde.</hint>
                <required>Pflichtfeld</required>
                <type-bind>Dissertation, Habilitationsschrift, Abschlussarbeit (Bachelor), Abschlussarbeit (Master; Diplom), Bericht, Studienarbeit, Zeitschriftenheft</type-bind>
            </field>
            <field>
                <dc-schema>dc</dc-schema>
                <dc-element>date</dc-element>
				<dc-qualifier>created</dc-qualifier>
                <repeatable>false</repeatable>
                <label>Jahr/Monat/Tag oder Zeitraum der Erstellung</label>
                <input-type>onebox</input-type>
                <hint>Zulässige Formate: YYYY-MM-DD, YYYY-MM, oder YYYY. Bei Angabe eines Zeitraums das End- und Startdatum durch "/" trennen, z.B. 2014/2016, 2014-09/2016-01 etc.</hint>
                <required>Pflichtfeld</required>
                <type-bind>Bewegte Bilder, Einzelbild, Software, Sonstiges (nicht textgeprägt), Ton</type-bind>
            </field>
        </row>

        <row>
            <field>
                <dc-schema>dc</dc-schema>
                <dc-element>date</dc-element>
				<dc-qualifier>issued</dc-qualifier>
                <repeatable>false</repeatable>
                <label>Erscheinungsdatum</label>
                <input-type>onebox</input-type>
                <hint>YYYY, YYYY-MM oder YYYY-MM-TT. Wenn die Publikation bisher nirgendwo anders veröffentlicht wurde, geben Sie hier bitte den Text "today" ein (ohne die Anführungszeichen).</hint>
                <required>Pflichtfeld</required>
            </field>
        </row>

        <row>
            <field>
                <dc-schema>dc</dc-schema>
                <dc-element>date</dc-element>
				<dc-qualifier>embargo</dc-qualifier>
                <repeatable>false</repeatable>
                <label>Embargodatum (intern)</label>
                <input-type>onebox</input-type>
                <hint>Datum, an dem das Embargo abläuft. YYYY-MM-TT.</hint>
                <required/>
                <visibility>workflow</visibility>
            </field>
        </row>

        <row>
            <field>
                <dc-schema>dc</dc-schema>
                <dc-element>relation</dc-element>
                <dc-qualifier/>
                <repeatable>true</repeatable>
                <label>Verlinkung anderer Veröffentlichung</label>
                <input-type value-pairs-name="versions2">qualdrop_value</input-type>
                <hint>Dies können z.B. spätere Versionen, ergänzende Forschungsdaten oder Errata sein. Bei kumulativen Hochschulschriften hinterlegen Sie hier bitte einzeln die enthaltenen Artikel. Wählen Sie links die Art der Verlinkung und geben Sie rechts eine persistente URL ein, z.B. https://doi.org/10.18725/OPARU-4041</hint>
                <required/>
                <type-bind>Wissenschaftlicher Artikel, Wissenschaftlicher Beitrag, Beitrag zu einem nicht-wissenschaftlichen Periodikum, Bericht, Bewegte Bilder, Buch, Einzelbild, Konferenzband, Beitrag zu einer Konferenz, Lehrmaterial, Patent; Norm; Standard, Arbeitspapier, Preprint, Rezension, Software, Sonstiges (nicht textgeprägt), Sonstiges (textgeprägt), Studienarbeit, Teil eines Buches, Zeitschriftenheft, Ton, Vorlesung, Abschlussarbeit (Bachelor), Abschlussarbeit (Master; Diplom)</type-bind>
            </field>
        </row>

        <row>
            <field>
                <dc-schema>dc</dc-schema>
                <dc-element>relation</dc-element>
                <dc-qualifier/>
                <repeatable>true</repeatable>
                <label>Verlinkung anderer Veröffentlichung, insbes. bei kumulativen Hochschulschriften die enthaltenen Artikel</label>
                <input-type value-pairs-name="versions2">qualdrop_value</input-type>
                <hint>Tragen Sie bei kumulativen Arbeiten die enthaltenen Artikel ein. Wählen Sie für jeden Artikel "Enthält" aus dem Dropdown aus und geben Sie in die freie Zeile die bibliografische Angabe des Artikels inkl. persistenter URL (z.B. http://doi.org/10.18725/OPARU-4041) ein.</hint>
                <required/>
                <type-bind>Dissertation, Habilitationsschrift</type-bind>
            </field>
        </row>

        <row>
            <field>
                 <dc-schema>uulm</dc-schema>
				<dc-element>projectEU</dc-element>
                 <dc-qualifier></dc-qualifier>
                 <repeatable>true</repeatable>
                 <label>EU-Projekt uulm</label>
                 <input-type>onebox</input-type>
                 <hint>Für EU-geförderte Projekte mit Beteiligung der Universität Ulm. Wählen Sie ein Projekt aus der Vorschlagsliste aus, damit die Publikation automatisch auch in OpenAIRE, CORDIS und im Participant Portal nachgewiesen wird. Alternative Freitexteingabe in der Form: Akronym / Projektname / EC / Förderprogramm / Projekt ID</hint>
                 <required></required>
				<visibility>submission</visibility>
            </field>
        </row>
        <row>
           <field>
             <dc-schema>uulm</dc-schema>
             <dc-element>projectEU</dc-element>
             <dc-qualifier></dc-qualifier>
             <repeatable>true</repeatable>
             <label>EU-Projekt uulm</label>
             <input-type>onebox</input-type>
             <hint>Für EU-geförderte Projekte mit Beteiligung der Universität Ulm. Hier muss hinter den Einträgen ein "Daumen hoch" stehen. Ist dies nicht der Fall, muss der Eintrag entweder erst noch normiert oder dem Lookup hinzugefügt werden. Kontaktieren Sie in letzerem Fall die OPARU Administration.</hint>
             <required></required>
             <visibility>workflow</visibility>
           </field>
        </row>
        <row>
           <field>
             <dc-schema>uulm</dc-schema>
             <dc-element>projectDFG</dc-element>
             <dc-qualifier></dc-qualifier>
             <repeatable>true</repeatable>
             <label>DFG-Projekt uulm</label>
             <input-type>onebox</input-type>
             <hint>Für DFG-geförderte Projekte mit Beteiligung der Universität Ulm. Die Auswahlliste befindet sich derzeit im Aufbau. Bitte orientieren Sie sich bei Freitexteingaben an der Syntax der vorhandenen Werte.</hint>
             <required></required>
           </field>
        </row>
        <row>
           <field>
             <dc-schema>uulm</dc-schema>
             <dc-element>projectOther</dc-element>
             <dc-qualifier></dc-qualifier>
             <repeatable>true</repeatable>
             <label>Weitere Projekte uulm</label>
             <input-type>onebox</input-type>
             <hint>Für weitere Projekte mit Beteiligung der Universität Ulm. Wählen Sie ein Projekt aus der Auswahlliste aus oder geben Sie einen Freitext ein in der Form: Akronym (optional) / Projektname / Drittmittelgeber / Projekt ID</hint>
             <required></required>
           </field>
        </row>
        <row>
           <field>
             <dc-schema>uulm</dc-schema>
             <dc-element>funding1</dc-element>
             <dc-qualifier></dc-qualifier>
             <repeatable>true</repeatable>
             <label>Förderinformationen</label>
             <input-type>onebox</input-type>
             <hint>Bitte die importierten Förderinformationen sichten, ggf. normieren und in die oberen Felder eintragen oder (bei keiner Beteiligung der Uni Ulm) löschen.</hint>
             <required></required>
             <visibility>workflow</visibility>
           </field>
        </row>

@mirkoscherf
Copy link
Contributor

If I comment out all rows which are a) required and b) have a type-bind value hiding them in the current submission, the icon becomes green with the same fields filled out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants