Bug 14855 - Resend notices in Notices tab with AJAX + REST
Summary: Resend notices in Notices tab with AJAX + REST
Status: BLOCKED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on: 14843 12426
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-18 14:41 UTC by Lari Taskula
Modified: 2020-10-15 08:38 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14855: Resend notices in Notices tab with AJAX + REST (11.43 KB, patch)
2015-09-21 10:55 UTC, Lari Taskula
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2015-09-18 14:41:27 UTC
Bug 12426 introduces a resend link to resend sent and failed messages. It uses POST method. Since Bug 14843 gives us REST API for notifications, we should enhance 12426 to use REST API via AJAX and only allow Staff members with permission "resend_message" to be able to see the link and use it.
Comment 1 Lari Taskula 2015-09-21 10:55:52 UTC
Created attachment 42717 [details] [review]
Bug 14855: Resend notices in Notices tab with AJAX + REST

Bug 12426 introduces a resend link to resend sent and failed messages. It uses
POST method. Since Bug 14843 gives us REST API for notifications, we should
enhance 12426 to use REST API via AJAX and only allow Staff members with
permission "resend_message" to be able to see the link and use it.

This patch changes the request into AJAX POST via the REST API for notifications.

To test:
-3. Make sure you have all the dependant patches
-2. Enable system preference EnhancedMessagingPreferences
-1. Make sure you do not have permission messages -> resend_message
-0. To view Notices without superlibrarian permission, you need
    - borrowers -> view_borrowers
    - catalogue -> staff_login

To test:
1. Have/create some pending sms messages into message_queue
2. Go to Patrons -> Notices
3. Resend one of the message and observe the page will reload
4. Apply patch
5. Reload Patrons -> Notices and observe there is no Resend link
6. Add yourself the permission messages -> resend_message
7. Reload Patrons -> Notices and observe there is Resend link
8. Resend a message and observe page will not reload
9. Observe that the message status has changed to pending
Comment 2 Jonathan Druart 2016-08-24 11:25:30 UTC
Blocked by bug 14843.