aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-02-06Refs #5682; Fix warningZog
2018-02-06Refs #5682; Add application_days field to calendarsZog
2018-02-06Fix specsZog
2018-02-06Fix Reflex importZog
2018-02-06Refs #5754; Add a filter on calendars for ReferentialVJs#indexZog
2018-02-06Refs #5754; Add a filter on purchase_windows on ReferentialVJs#indexZog
2018-02-06Fix StopArea validation breaking the specsZog
2018-02-06Try and fix jenkins buildsZog
2018-02-06VehicleJourneys#index: Allow company deletion in 'add' modalTeddy Wing
While the 'x' button in the Select2 was available in the 'edit' modal for a vehicle journey, it was not in the 'add' modal. Thus, once you added an associated company, you couldn't remove it in the modal. You'd either have to cancel and create your vehicle journey again, or create it an delete the company in the 'edit' modal later. This enables the 'x' button in the 'add' modal (it previously was only enabled when `editMode` was active) and sets the proper action/reducer to remove the company. The `allowClear` attribute was changed to only work in the 'edit' modal in 0079238842263768b88b0fa0fd977824b49eabd5. That commit appears to be changing things so that certain functions work when not in 'edit' mode. The case we're concerned about is that the 'edit' modal can be opened when in 'view' mode (not 'edit' mode) in order to get more detailed information about a vehicle journey. This means the company Select2 is available in 'view' mode, and the 'x' button should not be visible in that case. But, when I tested this, even with `allowClear: true`, the 'x' button wasn't visible. This, I can only assume, is because the Select2 is in a 'disabled' state, so it's smart enough to know not to show the 'x' button. Which works great for us, because this allows us to not show the 'x' button here and still show it in the 'add' and 'edit' modals. Refs #5574
2018-02-06Refs #5750; Remove useless validationZog
2018-02-06Disable immature featureZog
2018-02-06Refs #5750; Fix validationZog
2018-02-06Refs ##5370 Set network action_link to disabled if line doesn't have onecedricnjanga
2018-02-06VehicleJourney.state_permited_attributes: Fix whitespaceTeddy Wing
Add line breaks to make this method more readable. Refs #5574
2018-02-06VehicleJourney: Allow deletion of associated companyTeddy Wing
If the state doesn't contain a company, that means it was deleted on the frontend. In that case, the backend code should correctly delete the associated company from the vehicle journey. Refs #5574
2018-02-06Refs #5750; Add a validation on VehicleJourneysZog
Ensure a time is set for all non-commercial stops
2018-02-06Refs #5750 @1h; Manage non-commercial StopAreasZog
- Add a `kind` attribute - Hide irrelevant fields in the form
2018-02-06Refs #5750 @1h; Add a "kind" attribute to StopAreasZog
This determines if the StopArea is commercial or not The useless fields are hidden in the form for the non-commercials ones
2018-02-06Refs #5741 @2h; Add a map of all routes on a line#showZog
2018-02-06Refs #5718; Show times at stops in ReferentialVehicleJourneys#indexZog
When 1 or 2 stops have been selected
2018-02-06Refs #5571 @0.25h; Let the user select the number of items per pageZog
on ReferentialVehicleJourneys#index
2018-02-06Set all existing `StopArea`s with nil `kind`s to `:commercial`Teddy Wing
The other migration for this in `db/migrate/20180126134944_add_kind_to_stop_areas.rb` didn't handle `kind IS NULL`. Since all the `kind`s were initialised to NULL when the column was created, the `where` query didn't select any stop areas because it was looking for those with some varchar value, and thus it wasn't able to update any. This ensures our existing records all have a `kind` in case we end up using the field in a template at some point and our old data bugs out. Refs #5817
2018-02-06Revert "Prevent problem with StopArea#kind. Refs #5817"Teddy Wing
This reverts commit c2bc391ee91cac70e726d188be97dd2323df0df2. Thanks to 76abdbd66c16e6e1233685a5fa28a42cba5580d9, this temporary fix can be reverted. We don't actually need `kind` selected here, it was only added to appease the auto-initialisation of `kind` in `StopArea`. Now that we don't set a default value for `kind` on initialisation, we can remove it from this `select`.
2018-02-06StopArea: Don't auto-initialise a value for the `kind` attributeTeddy Wing
We were getting this error on `ReferentialVehicleJourneys#index`: Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Started GET "/referentials/9/vehicle_journeys" for 172.28.10.14 at 2018-02-01 17:48:32 +0100 Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Processing by ReferentialVehicleJourneysController#index as HTML Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Parameters: {"referential_id"=>"9"} Feb 1 17:48:32 chouette-dev rails/chouette[18900]: locale set to :fr Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Rendered referential_vehicle_journeys/_filters.html.slim (37.0ms) Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Rendered referential_vehicle_journeys/index.html.slim within layouts/application (54.3ms) Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Completed 500 Internal Server Error in 73ms (ActiveRecord: 10.4ms) Feb 1 17:48:32 chouette-dev rails/chouette[18900]: ActionView::Template::Error (missing attribute: kind):#012 23: = f.input :published_journey_name_lteq, label: false, wrapper_html: { class: 'w45'}#012 24: .form-group.togglable#012 25: = f.label Chouette::StopArea.model_name.human.pluralize, required: false, class: 'control-label'#012 26: = f.input :stop_area_ids, collection: @all_stop_areas.select(:id, :name).order(name: :asc), checked: params[:q] && params[:q][:stop_area_ids], as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + l.name + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'}, multiple: true#012 27: .form-group.togglable#012 28: = f.label Chouette::VehicleJourney.human_attribute_name(:purchase_window), class: 'control-label'#012 29: .filter_menu#012 app/models/chouette/stop_area.rb:51:in `block in <class:StopArea>'#012 app/views/referential_vehicle_journeys/_filters.html.slim:26:in `block in _app_views_referential_vehicle_journeys__filters_html_slim__692539656386688985_47285414929500'#012 app/views/referential_vehicle_journeys/_filters.html.slim:1:in `_app_views_referential_vehicle_journeys__filters_html_slim__692539656386688985_47285414929500'#012 app/views/referential_vehicle_journeys/index.html.slim:9:in `_app_views_referential_vehicle_journeys_index_html_slim___336434325333090796_47285419865660' Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Processing by ErrorsController#server_error as HTML Feb 1 17:48:32 chouette-dev rails/chouette[18900]: Parameters: {"referential_id"=>"9"} Feb 1 17:48:32 chouette-dev rails/chouette[18900]: locale set to :fr or, this one locally which is easier to read: ActiveModel::MissingAttributeError in ReferentialVehicleJourneys#index Showing .../stif-boiv/app/views/referential_vehicle_journeys/_filters.html.slim where line #44 raised: missing attribute: kind Extracted source (around line #51): after_initialize do > self.kind ||= :commercial end def self.nullable_attributes Trace of template inclusion: app/views/referential_vehicle_journeys/index.html.slim Rails.root: .../stif-boiv Application Trace | Framework Trace | Full Trace app/models/chouette/stop_area.rb:51:in `block in <class:StopArea>' app/views/referential_vehicle_journeys/_filters.html.slim:44:in `block in _app_views_referential_vehicle_journeys__filters_html_slim___131528464712770693_70134715599760' app/views/referential_vehicle_journeys/_filters.html.slim:1:in `_app_views_referential_vehicle_journeys__filters_html_slim___131528464712770693_70134715599760' app/views/referential_vehicle_journeys/index.html.slim:9:in `_app_views_referential_vehicle_journeys_index_html_slim__3124451149445015007_70134715309040' This is because on `ReferentialVehicleJourneys#index`, the StopArea filter makes this query: @all_stop_areas.select(:id, :name).order(name: :asc) Alban added a temporary fix for the release in c2bc391ee91cac70e726d188be97dd2323df0df2. After a discussion with Luc, he said we only want the initial value on the `#new` form, and we decided to take this out of the model and put it in the form template instead. Here, when a new `StopArea` is created, `:commercial` will be pre-filled in the `kind` field by default. On the `#edit` page, it should show the existing value of `kind` but not permit editing. Refs #5817
2018-02-06Fix checksum-related specsZog
2018-02-06Merge pull request #280 from af83/5417-checksum-relationshipsLuc Donnet
5417 Update parents checksum when children are created or updated
2018-02-06Fix StopAreas filters when no filter is presentZog
2018-02-06Merge pull request #279 from af83/5835-fix-timetable-creationLuc Donnet
5835 Timetables inherit application days from calendars
2018-02-06Merge pull request #278 from af83/5832-fix-filter-by-stopareas-on-vjs-indexLuc Donnet
5832 fix filter by stopareas on vjs index
2018-02-06Merge pull request #276 from af83/5825-fix-vjs-indexLuc Donnet
5825 Fix info window behaviour on VJs editor
2018-02-06imports.rake: Change `abort_old` to `netex_abort_old`Teddy Wing
After re-reading the ticket, I see now that the aborting of old imports should only apply to `NetexImport`s. Update the code to make this happen. Refs #4963
2018-02-06schedule.rb: Abort old imports before import notificationTeddy Wing
As a result of a new requirement, before doing the existing work we were doing in the imports cron job (notifying parent imports), we first need to clear out old imports and mark them as 'aborted'. Refs #4963
2018-02-06Import.abort_old: Don't change finished importsTeddy Wing
Imports that have a `finished_status` should not be changed to `aborted`. Refs #4963
2018-02-06Import: Add `.abort_old` methodTeddy Wing
This will abort all imports that don't have a finished status and were created more than four hours ago. We want to add this functionality to the import cron to auto-abort stale imports. Refs #4963
2018-02-06Merge pull request #284 from af83/5844-missing-title-on-new-importLuc Donnet
5844 Add missing translation
2018-02-05Refs #5844; Add missing translation5844-missing-title-on-new-importZog
2018-02-02Refs #5417; Fix specs5417-checksum-relationshipsZog
2018-02-02Merge pull request #277 from af83/5830-fix-route-duplication-buttonLuc Donnet
5830 Fix RouteDecorator's duplicate action
2018-02-02Merge pull request #250 from af83/3542-referential-overviewLuc Donnet
3542 referential overview
2018-02-02Refs #5417; Update parents checksum when children are created or updatedZog
2018-02-02Refs #3542; Small css fix3542-referential-overviewZog
2018-02-02Refs #3542; Add an anchor to filters URLsZog
2018-02-02Refs #3542; Better display for short referentialsZog
2018-02-02Refs #3542; Add a date lookupZog
2018-02-02Refs #3542 @2h; Various UI improvements (hopefully)Zog
2018-02-02Refs #3542, Fix specsZog
2018-02-02Refs #3542 @1h; Add sticky headerZog
2018-02-02Refs #3542 @1h; Adds filtersZog
2018-02-02Refs #3542 @1h; Add Time navigationZog
2018-02-02Refs #3542; Adds paginationZog