Angular Holdings Editor - Inactive Item Alert Types Appear

Bug #2002436 reported by John Amundson
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

Evergreen 3.10

When adding item alerts to an item in the new Angular Holdings Editor, the "Select Alert Type" dropdown displays item alert types have have the "active" field set to No/False. The inactive types are also selectable.

The dropdown should only display active alert types.

summary: - Angular Holdings Editor - Nonactive Item Alert Types Appear
+ Angular Holdings Editor - Inactive Item Alert Types Appear
Michele Morgan (mmorgan)
tags: added: cat-holdingseditor
Revision history for this message
Beth Willis (willis-a) wrote :

Noting that this also affects EG 3.9.1. For better or worse, the alerts display correctly during the circulation transaction even though the alert types are inactive.

Changed in evergreen:
status: New → Confirmed
tags: added: cat-itemalerts
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote (last edit ):

I'm seeing this in 3.11 also.

It looks like the request to grab the ccat items is trying to restrict to only active items.

return this.pcrud.retrieveAll('ccat',
        { active: true,
            scope_org: this.org.ancestors(this.auth.user().ws_ou(), true)
        }, {atomic: true}

It looks like this is the request that is returning all the the alert types.

["<key>", {id: {!=: null}}, {active: true, scope_org: [102, 101, 1]}]

Trying to track down why that isn't returning only the active alerts.

Josh

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

Ah, retrieveAll just grabs all the results with a simple search of the primary key not being null. The second argument is the pcrudopts... which can control sorting, but not search options.

It should be this.pcrud.search() if we want to limit to active... and active: true seems to not work, needs to be active: 't'.

Working branch at: user/stompro/lp2002436_limit_alert_type_active_angular_volcopy

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp2002436_limit_alert_type_active_angular_volcopy

tags: added: pullrequest
Revision history for this message
Galen Charlton (gmc) wrote :

Upon reviewing the patch, the patch itself does what it says and it matches how the old AngularJS holdings editor retrieved the alert types.

However, I turned up some ramifications that I think warrant additional discussion.

In particular, suppose you add an alert, then make its alert type inactive. What should happen?

With Josh's patch, the Angular interfaces will:

- not display the old alert at all in the item alerts dialog - it is currently explicitly filtering out alerts whose type is retrieved.
- but still display that the item has an alert in the Holdings View table.

In contract, the AngularJS interfaces will:

- display the alert in the item alerts dialog, but with the alert type dropdown set to a blank value
- display that the item has alerts in the Holdings View and Item Status tables

What's the desired behavior if an item alert's type is turned off? Options I see include:

- Act as if existing alerts of that type do not exist at all, and adjust the interfaces to not display or count them
- Actually display such existing alerts, but with some indication that their current type is inactive.

tags: added: needsdiscussion
Changed in evergreen:
importance: Undecided → Medium
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

What about a 3rd option? Not let you set an alert type as inactive if it's still in use by items? (like shelving locations)

If items are still using an alert type you could argue that it isn't really inactive and those items should be updated to use a different alert type first.

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

I would vote for inactive alert types being completely hidden, and putting it on the user/admin to check for active alerts of a certain type before they disable the alerts.

I can see it being useful to be able to quickly enable or disable entire groupings of alerts as a feature.

Josh

Revision history for this message
Terran McCanna (tmccanna) wrote :

Removing pullrequest until discussion is resolved

tags: removed: pullrequest
Revision history for this message
Joan Kranich (jkranich) wrote :

C/W MARS is working on development to fix this.

We are asking for item alerts with an inactive alert type to show the item alerts with an indication that their current type is inactive.

If the item alert has an inactive alert type, the library can edit that alert and change the type to an active alert or delete/clear the alert.

The inactive alert types should not display in the drop down list of alert types.

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.