María Checa
9d580e15f5
Adds activity tab for system emails
2018-07-26 17:55:06 +02:00
María Checa
f1e7b634ba
Adds moderate actions to proposal system notifications
2018-07-26 17:55:06 +02:00
María Checa
eb8c021451
Adds button to send pending proposal notifications
2018-07-26 17:55:06 +02:00
decabeza
d58941ef9c
Updates text on notifications spec
2018-07-26 17:55:06 +02:00
María Checa
7bddd97ed3
Adds validation of email present in valid_email? method
2018-07-26 17:55:06 +02:00
María Checa
b7a1599fdf
Adds logic to send proposal notifications in batches
...
WIP batches tests
2018-07-26 17:55:06 +02:00
rgarcia
9264763ec5
Log newsletter emails sent
...
With this commit we are logging which emails have already received the
newsletter
This could be important if something goes wrong sending the newsletter,
to be able to identify which users have already received the newsletter
and be able to skip them
We’ve had to add a new action to the Activity model (email) and add
paranoia features to be able to deal gracefully with the default
`with_hidden` scope in Activities[1]
[1]
https://github.com/AyuntamientoMadrid/consul/blob/master/app/models/acti
vity.rb#L2
2018-07-26 17:55:06 +02:00
rgarcia
8960928a76
Skip invalid emails when sending newsletter
...
We were seeing an exception when sending some emails due to having
invalid format
With this commit we are skipping this invalid formatted emails when
sending the newsletter
2018-07-26 17:55:06 +02:00
Angel Perez
c240c57171
Add budget investment factory to fix failing scenario
...
Changes introduced in commits 41f66fa and dc87b75 will render the
'See results' button under `admin/budget_investments` only if a
finished budget has winner investments associated with it
2018-07-26 14:54:20 +02:00
María Checa
15a07ad4eb
Adds logic to show 'see results' button only for finished budgets
2018-07-26 14:31:42 +02:00
Alberto
b04b1bee46
Merge pull request #2801 from consul/proposal_authors_notifications
...
Prevent authors from receiving their own proposals notification emails
2018-07-26 14:12:14 +02:00
Alberto
89f2f53e75
Merge pull request #2799 from wairbut-m2c/backport-2588-fix_supports_filter
...
Fix `max_per_heading` filter in Admin budget investments list
2018-07-26 14:11:03 +02:00
Alberto
f93b1e24fb
Merge pull request #2797 from wairbut-m2c/fix-admin-budget-investments-spec
...
Fix order-dependent spec
2018-07-26 13:57:04 +02:00
Alberto
d17b628426
Merge branch 'master' into backport-2588-fix_supports_filter
2018-07-26 13:44:20 +02:00
Alberto
273781430c
Merge pull request #2800 from wairbut-m2c/backport-2589-investments_supports_order_filter
...
Change admin budget investments list order by supports from less to more
2018-07-26 13:43:28 +02:00
Alberto
163d2f6edf
Merge pull request #2788 from javierv/2769-fix_flaky_notifications_spec
...
Fix flaky spec: Moderate proposal notifications Hide
2018-07-26 13:27:10 +02:00
Alberto
9eacc5c5ff
Merge pull request #2753 from consul/unfeasibility-explanation
...
Fix display of unfeasibility explanation
2018-07-26 13:21:21 +02:00
rgarcia
ab5f78120a
Fix specs
...
Git seems to have gotten confused and some specs where duplicated
and others missing
This commits restructures commits to sync them with Madrid's fork
2018-07-26 12:52:51 +02:00
María Checa
a62b5c1492
Removes author from Proposal#users_to_notify
2018-07-26 12:51:34 +02:00
María Checa
5dfefbbe2f
Change admin budget investments list order by supports from less to more
...
Sorting by id is in descending order and by title ascending
Backported from AyuntamientoMadrid/consul
2018-07-26 12:24:53 +02:00
Alberto
ad7166166c
Merge pull request #2796 from consul/remove_see_results_button
...
Removes permissions for admins to access unfinished budget results
2018-07-26 12:16:26 +02:00
Alberto
25feaafce5
Merge pull request #2794 from consul/fix_notifiable_delegation
...
Try if notifiable has notifiable methods
2018-07-26 11:33:23 +02:00
Marko Lovic
b816a5be00
Fix order-dependent specs
...
Due to how DB IDs are assigned with AUTO INCREMENT, tests
cannot assume that any specific ID will be available.
2018-07-26 11:25:51 +02:00
María Checa
2dd5fe22a8
Removes permissions for admins to access unfinished budget results
2018-07-26 11:07:19 +02:00
Bertocq
c0feabd71e
Try if notifiable has notifiable methods
...
Why:
There are Notifications with associated `notifiables` that actually are
not anymore Notifiables (the class doesn't include the Notifiable
concern). So when Notification delegates certain "notifiable" methods
to them the is an error.
How:
Using `try` directly on the notifiable association to avoid the delegate
trap on those corner case scenarios.
2018-07-26 10:33:04 +02:00
María Checa
4d355f3531
Added year to showed creation date and ordered by date DESC
...
Backported from AyuntamientoMadrid/consul fork
2018-07-26 10:22:42 +02:00
Bertocq
ac9f85e208
Change Proposal Notification Digest link to anchor
...
On the proposal notification digest messages there was a link to each
notification. Instead we need that link to point towards the notifications
tab of the proposal.
2018-07-25 20:20:33 +02:00
Bertocq
eb0919d978
Add Preview Pending action to Admin System Emails
...
Some system emails need to be manually reviewed before being sent. This
new action allows admins to see a preview of all Pending to be sent
Proposal Notification Digest messages.
2018-07-25 20:20:33 +02:00
Bertocq
5c726e0949
Add Admin System Emails view & first system email
...
Admins need to be able to see what a particular System Email looks like
with dummy data.
Also adding the first system email to be managed: the proposal
notification digest.
In case the current admin doesn't have any Notifications from
ProposalNotifications there will be a crash. We'll solve this in later
PR's with a system to "inject" sample text in email templates without
having to generate records in the database.
2018-07-25 20:20:33 +02:00
Alberto
177eedf8e4
Merge pull request #2580 from consul/admin_notifications
...
Admin notifications
2018-07-25 20:05:19 +02:00
decabeza
8b6a8703e0
Adds missing fill_in_admin_notification_form in common actions
2018-07-25 19:13:31 +02:00
decabeza
bbf3faa783
Fixes admin notifications specs
2018-07-25 19:12:48 +02:00
Alberto
7b8003dcb9
Merge pull request #2790 from wairbut-m2c/backport-1421-investments_csv_fixes
...
Add visible_to_valuators and author_username to admin investments CSV
2018-07-25 18:41:29 +02:00
Bertocq
e010f95485
Increase notifications spec with AdminNotification scenarios
2018-07-25 18:33:45 +02:00
Bertocq
a10169bac0
Add specs for Admin AdminNotification management
2018-07-25 18:31:41 +02:00
Bertocq
45488d117a
Create AdminNotification model, spec and factory
2018-07-25 18:30:29 +02:00
María Checa
e9d73eb687
Fix max_per_heading filter in Admin budget investments list
...
Also changed the name of the param to `min_total_supports`, which is more descriptive on what it actually does.
Backport of 75f20d5 and 07f0806 from AyuntamientoMadrid/consul fork
2018-07-25 15:44:51 +02:00
Marko Lovic
601e3058d8
Add visible_to_valuators and author username to admin investments CSV
...
Backport based on 012e4be by María Checa from AyuntamientoMadrid/consul fork
2018-07-25 15:10:56 +02:00
Alberto
61589122ef
Merge pull request #2723 from wairbut-m2c/backport_2400_combine_free_text_search_and_filters
...
Combine text search and filters for Investments on Admin panel
2018-07-25 14:42:19 +02:00
Marko Lovic
53a1ea8847
Fix spec
2018-07-25 14:15:37 +02:00
Javier Martín
8b78dd88a0
Fix typo in proposal notifications spec.
2018-07-25 01:49:47 +02:00
Alberto
3528f09202
Merge pull request #2787 from consul/budgets-specs
...
Fixes tags budget investments specs
2018-07-24 20:25:34 +02:00
decabeza
717b0c183b
Fixes tags budget investments specs
2018-07-24 18:49:56 +02:00
decabeza
b4f7f8e0f3
Fixes show investment's price & cost explanation spec
...
Backport from AyuntamientoMadrid/consul
2018-07-24 12:25:48 +02:00
decabeza
69ca2be994
Fixes budget investments filter by tag spec
...
Backport from AyuntamientoMadrid/consul
2018-07-24 12:25:19 +02:00
María Checa
8c69871cfa
Add logic to show only winner investments if budget is finished
...
Backported from AyuntamientoMadrid/consul
2018-07-24 11:33:38 +02:00
Alberto
81b102f002
Merge pull request #2577 from consul/random-order
...
Fix random order for budget investments
2018-07-20 18:31:37 +02:00
Alberto
bc5d263a53
Merge pull request #2761 from wairbut-m2c/backport_1384-add-max-heading-number-budget-group-list
...
Backport 1384 add max heading number budget group list
2018-07-20 13:17:38 +02:00
Alberto
bed97347a9
Merge pull request #2762 from wairbut-m2c/backport_1208-flaky-already-voted-on-booth-cannot-vote-on-website
...
Backport Flaky spec: Polls Booth & Website Already voted on booth cannot vote on website
2018-07-20 13:17:24 +02:00
rgarcia
2366182689
Fix specs
2018-07-20 12:28:56 +02:00