aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-15Small fixes for i18n state Refs #6146 @16146-line-statesLuc Donnet
2018-03-14Refs #6146; Fix display in tablesZog
2018-03-14Refs #6146; Add specsZog
2018-03-14Refs #6146; Fix typoZog
2018-03-14Refs #6146; Fix "activated/deactivated" filterZog
2018-03-12Refs #5146 Line state updatecedricnjanga
2018-03-12Merge pull request #368 from af83/6161-missing_var_in_crontabAlban Peignier
Added missing variables in cron launch script. Refs #6161
2018-03-12Save database.yml. Refs #6047Alban Peignier
2018-03-09added missing variables6161-missing_var_in_crontabFlorent Peyraud
2018-03-09Refs #5934 clean spec filecedricnjanga
2018-03-09Refs #5934 Remove destructive action links for route stop points in Routes#showcedricnjanga
2018-03-09Refs #5934 Add specs to routes spec featurecedricnjanga
2018-03-09Refs #5934 Only display stop point action links if user has policycedricnjanga
2018-03-09Don't use fetch for ENV['RAILS_DB_PASSWORD']. Refs #6047Alban Peignier
2018-03-09Create ci:build, ci:docker and ci:docker:clean. Rename ↵Alban Peignier
config/database/jenkins.yml in ci.yml. Refs #6047
2018-03-09Create ci:build, ci:docker and ci:docker:clean. Rename ↵Alban Peignier
config/database/jenkins.yml in ci.yml. Refs #6047
2018-03-09Merge pull request #366 from af83/5989-fix_compliance_check_resource_statusLuc Donnet
Fix compliance_check_resource and compliance_check_set status Refs #5…
2018-03-08Fix compliance_check_resource and compliance_check_set status Refs #5989 @15989-fix_compliance_check_resource_statusLuc Donnet
2018-03-07Chouette::Line#by_name: Use `LEFT OUTER JOIN` on "companies"Teddy Wing
Thanks to Johan for helping me with this. He correctly remarked that what I had before will do an `INNER JOIN`, which ends up excluding lines that don't have an associated company. I didn't really think about the data, and didn't realise we had lines without a company. Big thanks to Johan for seeing that I needed to add `public.` to qualify the `companies` table in order for the join to work. Otherwise it doesn't work correctly and we can't filter by company name. Refs #5889
2018-03-07AutocompleteLines: Sanitize `:q` param in `LIKE` operatorTeddy Wing
Johan made a number of good points here: > * I think this belongs in the model > * I would rather use a named parameter here > `.where('lines.number LIKE :q OR lines.names LIKE :q ...', q: > "%#{params[:q]}%")` > * You should defiitely escape the params before passing it to your db. > `sanitize_sql_like` seems like the best choice here I wasn't thinking about sanitisation at all and just assumed the `?`s in the prepared statement would take care of it for me. But obviously, we're passing `%`s in the param, so users can of course do the same thing. Protect against this using the `ActiveRecord::Sanitization#sanitize_sql_like` method. This is a private class method, so in order to use it we have to call it from inside the `Chouette::Line` model. And of course the named parameters are a no-brainer. At the time, I had seen that `Array` splat somewhere else in the codebase and just blindly copied the format, forgetting that named parameters even existed. Refs #5889
2018-03-07Change route to AutocompleteLinesControllerTeddy Wing
Johan recommended not putting it in a separate `/autocomplete...` route, but instead to use `/referentials/4/lines/autocomplete` to be more RESTful. Makes perfect sense. Refs #5889
2018-03-07Refs #5889; Add missing specsZog
2018-03-07VehicleJourney: Remove `.lines` methodTeddy Wing
This is no longer needed thanks to the `AutocompleteLinesController` and the AJAX filter in `app/views/referential_vehicle_journeys/_filters.html.slim`. Refs #5889
2018-03-07AutocompleteLinesController: Add basic specs for filtersTeddy Wing
Simple checks that the filters by `number`, line `name`, and company `name` work. Refs #5889
2018-03-07AutocompleteLinesController: Move filter SQL string inside queryTeddy Wing
Get rid of the heredoc to allow us to put the string inside the argument to the function directly and thus make the query more readable by putting it in context. Refs #5889
2018-03-07AutocompleteLinesController: Include company name in filterTeddy Wing
The `#display_name` used in the drop-down on `ReferentialVehicleJourneys#index` includes the line's company name. Include this as a field to filter lines by. Additionally, use `%query%` filtering everywhere. It's going to be slower, but will produce the same behaviour for all fields for consistency and is easier for searching by company name when you might want to filter by a term in the middle of the name. Refs #5889
2018-03-07ReferentialVehicleJourneys#index: Make lines filter asynchronousTeddy Wing
Instead of doing a complex query to get the lines available to filter on, just get all the lines in the current referential. We then filter those by what was typed into the select2 box and asynchronously respond with line options in a new JSON autocomplete controller. Here we're only providing the option to filter by `number` and `name` field on the line. I'd like to filter by everything in the `#display_name`. I don't think the objectid is going to be easy to integrate into the SQL query but I'd like to add the company part. It's possible we could do the objectid filter in Ruby instead of the database query. Refs #5889
2018-03-06Update gtfs_import to test java partLuc Donnet
2018-03-06Fixes logs_output_dir in imports tasks and into ↵Alban Peignier
SimpleImporter#dump_csv_from_context. Refs #5924
2018-03-05Merge pull request #359 from af83/6068-simple-exporterAlban Peignier
Simple exporter. Refs #6068
2018-03-05Returns nil value into SimpleExporter#resolve_value when one of the ↵Alban Peignier
attributes in the chain is nil. Refs #6068
2018-03-05Create output_dir if needed. Refs #6068Alban Peignier
2018-03-05Use Workbench#calendars in STIF::Dashboard. Refs #6064Alban Peignier
2018-03-05Use Workbench#calendars in dashboard. Refs #6064Alban Peignier
2018-03-05Remove primary_key overriding in models. Refs #6112Alban Peignier
2018-03-05Merge pull request #349 from af83/6039-handle-long-delats-in-vj-editorLuc Donnet
6039 Display '+' when a delta is > 99
2018-03-05Refs #6068; Remove warning for controlled empty fieldsZog
2018-03-05Refs #6068; Fix specsZog
2018-03-05Refs #6068; :fire: useless methodZog
and fix specs
2018-03-05Refs #6068; Fully functional JSON exporterZog
2018-03-05Refs #6068; First steps toward JSON exporterZog
2018-03-05Delete use of current_offer_workbench and replace by current_workbench Refs ↵Luc Donnet
#4658
2018-03-05Merge pull request #358 from af83/new-ccset-affectationteddywing
New ccset affectation
2018-03-05workbenches.en.yml: Update grammar of `referential_count.zero`Teddy Wing
Make this phrase more grammatically correct.
2018-03-05workbenches.fr.yml: Remove extra spaceTeddy Wing
2018-03-05Refs #6068; Add some helpers in the modelsZog
2018-03-05Refs #6068; Export VehicleJourneysZog
Add a mechanism to allow for several rows in the csv per single object in the collection.
2018-03-04Refs #3562 Small change in controller to match routescedricnjanga
2018-03-03Merge pull request #351 from ↵Luc Donnet
af83/6008-no-transition-time-for-journeys-start-and-end 6008 Use same time for arrival & departure in 1st and last stops
2018-03-03Merge pull request #356 from af83/6044_add_ccset_spec_affectationLuc Donnet
Refs #6044 Add spec to check that CCSet#index only dislays objets fro…