<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core, branch 5709_fix_ccset_sorting</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>Refs #5709 Fix CCSet index table builder sorting &amp; add show button in gear menu link</title>
<updated>2018-02-07T20:24:38+00:00</updated>
<author>
<name>cedricnjanga</name>
</author>
<published>2018-02-07T20:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9d7e4b4bc23ce343a0c6acb7805112d64dd97a1a'/>
<id>9d7e4b4bc23ce343a0c6acb7805112d64dd97a1a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #5565 Remove the application name on the error pages</title>
<updated>2018-02-07T14:18:50+00:00</updated>
<author>
<name>cedricnjanga</name>
</author>
<published>2018-02-05T14:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=1a9515637e0f4b45647ccf95e4cdd884bbe56891'/>
<id>1a9515637e0f4b45647ccf95e4cdd884bbe56891</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Begin workbench output show refactoring to use stif guidelines</title>
<updated>2018-02-07T10:34:49+00:00</updated>
<author>
<name>Luc Donnet</name>
</author>
<published>2018-02-01T14:10:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=274cbdc6dce4164da61902f216d8cece2ce52c5e'/>
<id>274cbdc6dce4164da61902f216d8cece2ce52c5e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #281 from af83/5817-referential-vehicle-journeys-index--fix-StopArea-kind-a</title>
<updated>2018-02-07T09:03:36+00:00</updated>
<author>
<name>Luc Donnet</name>
</author>
<published>2018-02-07T09:03:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=de6ef9294f7a1890d6f9de479e965d571233a96e'/>
<id>de6ef9294f7a1890d6f9de479e965d571233a96e</id>
<content type='text'>
5817 referential vehicle journeys index  fix stop area kind a</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
5817 referential vehicle journeys index  fix stop area kind a</pre>
</div>
</content>
</entry>
<entry>
<title>Set all existing `StopArea`s with nil `kind`s to `:commercial`</title>
<updated>2018-02-06T13:47:31+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-02-02T17:14:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=7d24256844e33bcb7875076a4bcfae22dd308009'/>
<id>7d24256844e33bcb7875076a4bcfae22dd308009</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Prevent problem with StopArea#kind. Refs #5817"</title>
<updated>2018-02-06T13:47:31+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-02-02T16:57:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=2913e072467ca0f9f93186e39e42e637b3e33152'/>
<id>2913e072467ca0f9f93186e39e42e637b3e33152</id>
<content type='text'>
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`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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`.
</pre>
</div>
</content>
</entry>
<entry>
<title>StopArea: Don't auto-initialise a value for the `kind` attribute</title>
<updated>2018-02-06T13:47:31+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-02-02T16:44:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=3a80c4217751a2f5509d0a67d531a65ff5b047df'/>
<id>3a80c4217751a2f5509d0a67d531a65ff5b047df</id>
<content type='text'>
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"=&gt;"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] &amp;&amp; params[:q][:stop_area_ids], as: :check_boxes, label: false, label_method: lambda{|l| ("&lt;span&gt;" + l.name + "&lt;/span&gt;").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 &lt;class:StopArea&gt;'#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"=&gt;"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
    &gt;     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 &lt;class:StopArea&gt;'
    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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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"=&gt;"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] &amp;&amp; params[:q][:stop_area_ids], as: :check_boxes, label: false, label_method: lambda{|l| ("&lt;span&gt;" + l.name + "&lt;/span&gt;").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 &lt;class:StopArea&gt;'#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"=&gt;"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
    &gt;     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 &lt;class:StopArea&gt;'
    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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix checksum-related specs</title>
<updated>2018-02-06T11:48:57+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-02-06T11:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=4f58c4eaca46dc975aa907840cdbe067f6225d5e'/>
<id>4f58c4eaca46dc975aa907840cdbe067f6225d5e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #280 from af83/5417-checksum-relationships</title>
<updated>2018-02-06T10:56:29+00:00</updated>
<author>
<name>Luc Donnet</name>
</author>
<published>2018-02-06T10:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=dd7b62adcaa765b9dd5bcd3f3c156d6da2a9682c'/>
<id>dd7b62adcaa765b9dd5bcd3f3c156d6da2a9682c</id>
<content type='text'>
5417 Update parents checksum when children are created or updated</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
5417 Update parents checksum when children are created or updated</pre>
</div>
</content>
</entry>
<entry>
<title>Fix StopAreas filters when no filter is present</title>
<updated>2018-02-06T10:54:19+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-02-06T10:54:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=5bc9ba8dcb198029a43adbb1d79b8a496a5c1c69'/>
<id>5bc9ba8dcb198029a43adbb1d79b8a496a5c1c69</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
