Remove old-style copy/item alerts

Bug #2022349 reported by Chris Sharp
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

PINES is discovering that some item templates that pre-date the newer item alert infrastructure introduced in bug 1676608 are inserting data in the alert_message field that's still on asset.copy. When data is in that field, it alerts during checkin/checkout, but cannot be seen or removed by staff and requires direct database access. I propose that we remove the alert_message field from asset.copy. Branch underway.

Revision history for this message
Michele Morgan (mmorgan) wrote :

Confirmed! This would probably be a bit more difficult, but I would also love to see old-style copy alert data scrubbed from item templates.

tags: added: cleanup
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Elaine Hardy (ehardy) wrote :

I have request many times that folks edit their templates but there are some that are just not doing it. SO being able to remove it from the templates would be wonderful.

Revision history for this message
Michele Morgan (mmorgan) wrote :

I may be missing something, but I don't believe there is a way for a staff user to remove an old style copy alert from a template in the web client.

Revision history for this message
Elaine Hardy (ehardy) wrote :

You can't. You have to delete the old holdings template with the alert and add a new one.

Revision history for this message
Chris Sharp (chrissharp123) wrote :
Changed in evergreen:
assignee: Chris Sharp (chrissharp123) → nobody
tags: added: pullrequest
Revision history for this message
Galen Charlton (gmc) wrote :

Thanks for the branch, Chris. As one immediate piece of feedback, rather than having Vandelay drop the ability to import alert messages, perhaps it should use it to create a new-style item alert. However, that would raise the question of what item alert type to use.

Of course, another factor is whether or not anybody is actually trying to set alert messages via Vandelay in the first place.

Revision history for this message
Chris Sharp (chrissharp123) wrote :

I don't know enough about Vandelay's general use cases to know. I'm tempted to kick that can down the road and trust that someone can open a subsequent bug report on it?

Revision history for this message
Blake GH (bmagic) wrote :

Is this patch missing the fm_IDL.xml changes? I installed it on bugsquash2.mobiusconsortium.org and I'm seeing errors about references to the missing column alert_message.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

It should be possible to search and replace in the database to get rid of the copy template alert messages that are in the wrong format.

So if you need to just look through your current templates to find alert messages that are causing problems, here are my notes and sql examples for doing that from the DB.

https://gitlab.com/-/snippets/2588515

I broke the json a few times when testing this out, so my examples show how to make a backup copy.

A perl script that would grab the templates and edit them would be better. Using regexs on json probably isn't a very good practice. I have a bunch of one off perl scripts to edit template json in files. We have 200 or so templates, so whenever we need to make some changes. If I get time I may create a perl script for adding/deleting entries from the templates.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Bug 1797418 seems to also be related to this issue, may be a duplicate, but mentions an issue with deposits that may be a different issue.

Josh

Changed in evergreen:
assignee: nobody → Chris Sharp (chrissharp123)
tags: added: needswork
removed: pullrequest
Revision history for this message
Chris Sharp (chrissharp123) wrote :
tags: added: pullrequest
removed: needswork
Changed in evergreen:
assignee: Chris Sharp (chrissharp123) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.