rism-digital / muscat

🗂️ A Rails application for the inventory of handwritten and printed music scores
http://muscat-project.org
34 stars 16 forks source link

Update wf_owner when non-marc authority records are updated #1589

Open fjorba opened 1 month ago

fjorba commented 1 month ago

Make this field visible in the display page, and update it using current user field. After uptading, redirect to the display page, because if redirects to the list, the modified record is lost and not easily accessible, except via the browser history.

Closes #1584

ahankinson commented 1 month ago

After uptading, redirect to the display page, because if redirects to the list, the modified record is lost and not easily accessible, except via the browser history.

@jenniferward should confirm if this is desired behaviour

fjorba commented 1 month ago

To clarify my slight change of the behaviour: it all starts with the current Muscat behavior (inherited from ActiveAdmin) that "remembers" the last search for each kind of record, in that case, non-marc authorities. Let's imagine that the last time you were visiting places was Brno. Later on, maybe another day, you see in any record (source, publication, person or institution) a reference to a misspelled Zaggreb. You clik on the authority record for Zaggreb to correct it and, after saving it, suddenly you find a list of cities alphabetically around Brno. Moreover, if your finger also pressed a key near the return one, you may not be sure that Zagreb had been effectively corrected. I have been bitten by this behaviour.

This slight change means that after correcting a place, subject, title or liturgical feast, Muscat now shows the record that you have just corrected, so you can check if your correction was right or not.

xhero commented 1 month ago

Does this change the owner every time a record is saved? For the search problem, in the current devel branch Muscat is tab independent so searches should not cross tabs anymore.

xhero commented 1 month ago

After uptading, redirect to the display page, because if redirects to the list, the modified record is lost and not easily accessible, except via the browser history.

@jenniferward should confirm if this is desired behaviour

Maybe we can add two links like in the MARC editor, "save and close" and "Save and stay here"?

fjorba commented 1 month ago

Does this change the owner every time a record is saved?

I'm not sure to fully understand your question, due to the links between bibliographic and authority records. This patch just corrects the owner of the non-marc authority record (places, subjects, titles and liturgical feasts) you have just updated. Depending on how is well received by you, I have further proposals, some of them already implemented in my installations, but I wanted to start with a simple case.

For the search problem, in the current devel branch Muscat is tab independent so searches should not cross tabs anymore.

That's good news. However, does it remember "old" searches like the Brno vs Zagreb scenario I've described above? Because I think that seeing what you have already corrected is a good thing on itself.

fjorba commented 1 month ago

After uptading, redirect to the display page, because if redirects to the list, the modified record is lost and not easily accessible, except via the browser history.

@jenniferward should confirm if this is desired behaviour

Maybe we can add two links like in the MARC editor, "save and close" and "Save and stay here"?

The "Save and stay here" in the MARC records means that you don't leave the editor. In non-Marc records, the current behavior is to leave the record and go to the list of the last searched authority of the current type.

I'd prefer not to add more buttons, because each of them means a doubt, a question and time resolving it.

jenniferward commented 1 month ago

I agree with the new behavior: after you save a non-MARC authority, you should be taken to the full record view, not the list. "Save and close" should be the same across Muscat - whether an element is MARC or not shouldn't make a difference in terms of this behavior.

Many thanks @fjorba !

jenniferward commented 1 month ago

In case this is relevant: I don't see owners for Standard Titles (https://muscat-test.rism.info/admin/standard_titles/50359392).

image

fjorba commented 1 month ago

Yes, this is also true: when authority records are created (at least) via importing bibliographic ones (or related authority), those newly created do not have owner.

I was waiting the outcome of this PR to open a new issue or discussion asking about ownership of records, but I prefer not to complicate this simple patch.

xhero commented 1 month ago

I finally had a moment to look at this - seems ok to me, auth files can be edited only by editors right?

jenniferward commented 1 month ago

Catalogers can edit the authority records they are the owner of (generally the ones they created).