Commit Graph

187 Commits

Author SHA1 Message Date
Javi Martín
87b073cbca Migrate milestones images and documents 2018-11-30 14:15:21 +01:00
Javi Martín
cb891f21d4 Simplify count_rows check
We had a line which was too long according to rubocop, and simplifying
the code makes the line shorter.
2018-11-30 14:15:21 +01:00
Marko Lovic
4c3dadf1fb Add Rake task to migrate milestone data to new tables 2018-11-30 14:15:21 +01:00
Marko Lovic
c0f6fa182f Make Milestones general, and not specific to Budget Investments
Generalize the Budget::Investment::Milestone model to a
polymorphic Milestone model so it can be used for entities
other than Budget::Investment.
2018-11-30 14:15:21 +01:00
Javi Martín
9404cb8b3a Fix bug with non-underscored locales
Ruby can't have hyphens in method names, so sending something like
`record.title_pt-BR` would raise an exception.

Using globalize's `localized_attr_name_for` method fixes the bug.

Thanks Marko for the tip.
2018-10-23 16:29:14 +02:00
Javi Martín
934bce5932 Don't abort the migration if the simulation fails
We think aborting the migration will generate more headaches to system
administrators, who will have to manually check and fix every invalid
record before anything can be migrated.
2018-10-23 16:29:14 +02:00
Javi Martín
7fff57a25f Add task to simulate data migration
This way we can check everything is OK before actually migrating the
data to the translations tables.
2018-10-23 16:29:14 +02:00
Javi Martín
3c48059f07 Log failed data migrations
In theory, it should never happen, but that's why exceptions exist.
2018-10-23 16:29:13 +02:00
Javi Martín
a84a0f2b7d Migrate custom pages data to their locale 2018-10-23 16:29:13 +02:00
Javi Martín
ef7be4fc55 Add task to migrate data to translation tables
We forgot to do it when we created the translation tables, and so now we
need to make sure we don't overwrite existing translations.
2018-10-23 16:29:13 +02:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
decabeza
16acb2a65f Adds enable help page task 2018-10-09 13:01:43 +02:00
Angel Perez
24adf4bc49 Improve Rake tasks performance replacing .all.each with .find_each 2018-09-10 11:38:19 -04:00
Juan Salvador Pérez García
6cc1ddb9af Fixes #231
Implements a poster feature for the proposals dashboard
2018-07-31 12:50:25 +02:00
Juan Salvador Pérez García
50f73abb0c Fixes #voodoorai2000 comments
Fixes some comments from #voodoorai2000 for the PR to consul
2018-07-27 16:30:03 +02:00
María Checa
3cc8b1d123 Removes rake task to send proposal notifications
This action will be performed manually by admin users from the `admin/system_emails` view.
2018-07-26 17:55:06 +02:00
Juan Salvador Pérez García
8876b285ce Fixes #229
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
Juan Salvador Pérez García
256c0d72a5 Fixes issues with successful proposal generation task 2018-07-17 17:59:12 +02:00
Juan Salvador Pérez García
a872c5b5df Fixes #200
Adds settings to complete the polls card and feature view.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
762c4faef6 Fixes #141
Adds ideal progress to progress graph
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
6e75f5b494 Fixes #140
Adds a new setting that allows defining what is considered a successful
proposal.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
c8b2f13cfd Fixed bug in rake task 2018-07-17 17:58:22 +02:00
Juan Salvador Pérez García
3c3f60dfcc Implements #173
Public view for suggested actions as well as resources has been
completelly redesigned.

Private side for this feature has been adapted as well in order to meet
the requirements.
2018-07-17 17:58:22 +02:00
Angel Perez
1884841ffc Add Rake task to enable recommendations settings 2018-07-15 21:28:59 -04:00
Angel Perez
e194240a0a Add rake task to enable recommendations for existing users 2018-07-15 21:28:59 -04:00
iagirre
0d9da5398b Fix banners in user pages
Banners were not been shown in certain pages; now
they are.

Spec to check if the banner is been shown correctly
added. Before it was in admins specs, now it has it's
own spec out of admins folder.
2018-07-12 10:17:25 -04:00
iagirre
82cb8d4c52 Changes suggested in PR:
* Delete all things related to banner images and styles (in code)
* Add a new test to check that the banner is showing correctly
* Update the specs accordingly to match the changes

Update dev_seed to set a random background_color and a font_color for banners (and remove everything about image and style)
Add a rake task to migrate the banner style to backgroun_color and font_color (so that the banners have the same colors than before)
2018-07-12 10:17:24 -04:00
iagirre
3690cae458 Apply banner style to the new banners
Banner sections can be saved (one banner can appear in several sections)
If the hex color is changed in the textfield, the color of the color picker changes.
2018-07-12 10:16:47 -04:00
Pierre Mesure
1ebcf04186 Adding images and seeds for the homepage 2018-06-15 14:26:29 +02:00
rgarcia
1f16f9df6b Add feed settings to release rake 2018-05-30 13:19:19 +02:00
rgarcia
25133043b2 Add rake task to initialize feeds in homepage 2018-05-29 19:58:37 +02:00
Bertocq
fcdc24a78c Avoid db:dev_seed log print when run from its test
The db:dev_seed rake logs info as it progresses as information for the
developer. But that's not needed when ran from its tests file, and it
bloats the travis/rspec output with unnecessary information.

Now the task will always log info unless the rake task receives an
optional argument.
2018-04-14 20:28:43 +02:00
Bertocq
35c156ba7a Create setting to enable/disable attached documents
Add setting to both seed and dev_seeds as well as a rake task to make it
easier to set.
2018-04-10 12:46:09 +02:00
Bertocq
6d55a0712d Remove no longer usable investments rake task 2018-03-09 11:44:51 +01:00
BertoCQ
38b66e8c6c Merge pull request #2295 from wairbut-m2c/aperez-mappable-objects
Improvements for Mappable objects
2018-02-02 19:26:47 +01:00
Bertocq
09aa5a17cf Add rake task to migrate investment's internal comments to thread 2018-01-31 01:11:15 +01:00
Angel Perez
665a5b57ab Empty instances of MapLocation won't result in a new DB record (#2220) 2018-01-26 09:26:48 -04:00
Bertocq
7db0d832d9 Fix typo at budgets:phases:generate_missing rake task 2018-01-17 13:02:14 +01:00
Bertocq
02d596c872 Add a rake task to generate missing Budget::Phase's and migrate descricptions 2018-01-16 15:20:52 +01:00
rgarcia
2b9b78e38e Add rake task to reset the cached votes counter 2017-12-26 12:40:26 +01:00
Bertocq
b02e2729e7 Rubocop style autocorrections 2017-12-16 17:59:16 +01:00
rgarcia
a6a71c996a adds rake task to initialise all polls' timestamps 2017-12-13 19:39:54 +01:00
taitus
9b6b57a24c Remove all white spaces 2017-09-06 14:12:32 +02:00
taitus
56eb30cc87 Add associate community rake task. 2017-09-05 12:55:12 +02:00
Bertocq
0740c3bc26 Add rake task to help migrate existing locale files to new structure 2017-07-05 13:30:05 +02:00
Bertocq
4068e50b33 Create rake task to generate slug for objects that use Sluggable concern
Why:

* Once slug presence validation and usage is merged on to a code base, existing objects without it will become invalid and unusable

How:

* Running `bundle exec slugs:gnerate` will look for all models that include the concern, and generate a slug for each object
2017-07-05 12:33:17 +02:00
Bertocq
20d57d4d46 Create rake task to migrate Setting key from per_page_code to per_page_code_head 2017-06-07 20:56:49 +02:00
rgarcia
712e576e75 adds email delivery of selected and unselected investments 2017-05-12 13:57:31 +02:00
rgarcia
deffc7f885 removes obsolete rake tasks 2017-05-04 20:34:39 +02:00
Alberto Miedes Garcés
98db33f623 Track email digests 2017-01-05 23:31:11 +01:00