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

Is wf_owner updated for non-marc records? Should it? #1584

Open fjorba opened 4 months ago

fjorba commented 4 months ago

I've just discovered that in my Muscat instances, wf_owner is updated only for Marc records (publications, sources, people, institutions, etc), but not for standard_titles, standard_terms, places or liturgical_feasts, even after effectively updating records. I'm pretty sure that I haven't patched anything related to this, but may I ask if it happens also in your instances, please?

If not, would you agree that it should be updated?

I have seen that all models, Marc and non-Marc, have the same belongs_to :user, :foreign_key => "wf_owner" statement, so the reason for not being updated appears to be a bug.

MariaDB [traces_development]> select distinct wf_owner from publications;
+----------+
| wf_owner |
+----------+
|        1 |
|        0 |
|        7 |
+----------+
3 rows in set (4.566 sec)

MariaDB [traces_development]> select distinct wf_owner from people;
+----------+
| wf_owner |
+----------+
|        3 |
|        6 |
|        0 |
+----------+
3 rows in set (0.238 sec)

MariaDB [traces_development]> select distinct wf_owner from institutions;
+----------+
| wf_owner |
+----------+
|        1 |
|        0 |
+----------+
2 rows in set (0.073 sec)

MariaDB [traces_development]> select distinct wf_owner from standard_titles;
+----------+
| wf_owner |
+----------+
|        0 |
+----------+
1 row in set (0.015 sec)

MariaDB [traces_development]> select distinct wf_owner from standard_terms;
+----------+
| wf_owner |
+----------+
|        0 |
+----------+
1 row in set (0.008 sec)

MariaDB [traces_development]> select distinct wf_owner from places;
+----------+
| wf_owner |
+----------+
|        0 |
+----------+
1 row in set (0.001 sec)

MariaDB [traces_development]> select distinct wf_owner from liturgical_feasts;
+----------+
| wf_owner |
+----------+
|        0 |
+----------+
1 row in set (0.070 sec)
fjorba commented 4 months ago

After some more tests, I understand better the current behaviour: a new non-Marc record, either created via the new button or via a bibliographic, effectively creates the wf_owner field, but this field is never updated again.

We are interested in updating it, so we know who did this modification.

xhero commented 4 months ago

I think we just never implemented it, we never really used this functionality (since only editors can touch auth files), but if you want to patch it go ahead!