DEV: Bookmarkable reminder refinement (#183)
Incorporates changes from core
0ca1152c1c
This commit is contained in:
parent
272e9dd760
commit
a48b7d1ab5
|
@ -1,3 +1,4 @@
|
||||||
|
2.9.0.beta7: 272e9dd760f82e33f9756866434ddcbe470cdb8e
|
||||||
2.9.0.beta2: e7c19ac107dcd37618c7ac7b98530e99c7fe31db
|
2.9.0.beta2: e7c19ac107dcd37618c7ac7b98530e99c7fe31db
|
||||||
2.8.0.beta3: 23287ece952cb45203819e7b470ebc194c58cb13
|
2.8.0.beta3: 23287ece952cb45203819e7b470ebc194c58cb13
|
||||||
2.7.7: 23287ece952cb45203819e7b470ebc194c58cb13
|
2.7.7: 23287ece952cb45203819e7b470ebc194c58cb13
|
||||||
|
|
|
@ -34,14 +34,12 @@ class DataExplorerQueryGroupBookmarkable < BaseBookmarkable
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.reminder_handler(bookmark)
|
def self.reminder_handler(bookmark)
|
||||||
bookmark.user.notifications.create!(
|
send_reminder_notification(
|
||||||
notification_type: Notification.types[:bookmark_reminder],
|
bookmark,
|
||||||
data: {
|
data: {
|
||||||
title: bookmark.bookmarkable.query.name,
|
title: bookmark.bookmarkable.query.name,
|
||||||
display_username: bookmark.user.username,
|
|
||||||
bookmark_name: bookmark.name,
|
|
||||||
bookmarkable_url: "/g/#{bookmark.bookmarkable.group.name}/reports/#{bookmark.bookmarkable.query.id}"
|
bookmarkable_url: "/g/#{bookmark.bookmarkable.group.name}/reports/#{bookmark.bookmarkable.query.id}"
|
||||||
}.to_json
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -112,9 +112,10 @@ describe DataExplorerQueryGroupBookmarkable do
|
||||||
expect(notif.data).to eq(
|
expect(notif.data).to eq(
|
||||||
{
|
{
|
||||||
title: bookmark1.bookmarkable.query.name,
|
title: bookmark1.bookmarkable.query.name,
|
||||||
|
bookmarkable_url: "/g/#{bookmark1.bookmarkable.group.name}/reports/#{bookmark1.bookmarkable.query.id}",
|
||||||
display_username: bookmark1.user.username,
|
display_username: bookmark1.user.username,
|
||||||
bookmark_name: bookmark1.name,
|
bookmark_name: bookmark1.name,
|
||||||
bookmarkable_url: "/g/#{bookmark1.bookmarkable.group.name}/reports/#{bookmark1.bookmarkable.query.id}"
|
bookmark_id: bookmark1.id
|
||||||
}.to_json
|
}.to_json
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue