-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Affects Version/s: RM 2.4
-
Fix Version/s: RM 2.4.1
-
Component/s: EMail Records
-
Labels:
-
Bug Priority:
-
Sprint:Flamebird 10 - Apocalypse
-
Story Points:3
Issue
Steps
- Create RM site
- Create file plan structure
- Create a number of vital records due for review
Observed
- All vital records are included in the review notification
Expected
- Notifications are sent for only those vital record due for review
Diagnosis
The query used in the job executor ...
+ASPECT:"rma:vitalRecord" +(@rma:reviewAsOf:[MIN TO NOW] ) +(@rma:notificationIssued:false OR ISNULL:"rma:notificationIssued" )
... is incorrect, because the +'s are interpreted as OR's rather than AND's . It should now take the FTS search format which looks like this ...
ASPECT:"rma:vitalRecord" AND @rma:reviewAsOf:[MIN TO NOW] AND (@rma:notificationIssued:false OR ISNULL:"rma:notificationIssued" )
This would ensure that only the eligible vital records are send out in the notification.
A further problem relates to the 'noficiationIssued' flag. Setting this on the notified vital records means that notification will only be sent once per vital record, even if a new review period elapses.
Suggested Fix
- Replace the current search query with a canned query, to both improve performance, ensure the query is live and remove dependence on the search index for this information.
- Remove the rma:notificationIssued flag so notifications are always sent for records due for review. (open question around AC3 and whether this is the correct intended behaviour)
Acceptance Criteria
1. No vital records due for review
Given that there are no vital records currently due for review
When the job executes
Then no review notification is sent
2. Vital record due for review
Given that there is a vital record due for review
When the job executes
Then a review notification is sent
And it includes the details of the record
3. Vital record still due for review
Given that there is a vital record still due for review
And a notification has already been sent including this vital record
When the job executes
Then a review notification is sent
And it includes the details of the record
4. Vital record due for review has been reviewed
Given that there is a vital record that was due for review that has been reviewed
And there are no other vital records due for review
When the job executes
Then no review notification is sent
5. Previously reviewed vital record due for another review
Given that there is a vital record that was due for review that has been reviewed
And is now due for review again
When the job executes
Then a review notification is sent
And it includes the details of the record
Given I have set the vital record review period
When the job is run
Then an email is sent if the calculated review by date has passed
Given a review is required for a vital record review period excluding "immediately"
When I mark the review complete
Then the review by date is recalculated based on the review period
Given a review is required for a vital record review period of "immediately"
When I mark the review complete
Then the vital record review period is reset to "none"
Note: A vital record review period of "none" indicates that there is no review by date
Note: Setting the vital record review period to "immediate" indicates that the record needs an adhoc review immediately (ie the review by date is set to now).
Note: A periodic review period is required if new review by dates should be automatically calculated, immediately isn't periodic, rather adhoc.
Questions
- The current implementation implies that notification should only be sent once per review cycle. I suggest this isn't correct and that we should continue to send review notifications until the record is reviewed. See AC 3. Thoughts?
- is related to by
-
RM-5340 Cannot Edit Review Date for empty electronic record and nonelectronic record
- Done
1.
|
Fix vital record notification job |
|
Done | Unassigned | |||||||
2.
|
Review Acceptance Criteria |
|
Done | Unassigned |
|
||||||
3.
|
Exploratory Testing |
|
Done | Unassigned |
|