mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Merge branch 'dev' for release 4.4.3
This commit is contained in:
commit
9966801faa
@ -1,5 +1,10 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
|
## v4.4.3 2020 May 25
|
||||||
|
|
||||||
|
- Fix a bug: recurrent availabilities do not keep the custom duration
|
||||||
|
- [TODO DEPLOY] `rails fablab:fix:availabilities_duration`
|
||||||
|
|
||||||
## v4.4.2 2020 May 19
|
## v4.4.2 2020 May 19
|
||||||
|
|
||||||
- Upgraded to ruby 2.6.5
|
- Upgraded to ruby 2.6.5
|
||||||
|
@ -21,7 +21,8 @@ class Availabilities::CreateAvailabilitiesService
|
|||||||
training_ids: availability.training_ids,
|
training_ids: availability.training_ids,
|
||||||
space_ids: availability.space_ids,
|
space_ids: availability.space_ids,
|
||||||
tag_ids: availability.tag_ids,
|
tag_ids: availability.tag_ids,
|
||||||
nb_total_places: availability.nb_total_places
|
nb_total_places: availability.nb_total_places,
|
||||||
|
slot_duration: availability.slot_duration
|
||||||
).save!
|
).save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -174,5 +174,18 @@ namespace :fablab do
|
|||||||
sp.save!
|
sp.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc '[release 4.4.3] fix duration of recurring availabilities'
|
||||||
|
task availabilities_duration: :environment do
|
||||||
|
Availability.select(:occurrence_id).where(is_recurrent: true).group(:occurrence_id).each do |a|
|
||||||
|
occurrences = Availability.where(occurrence_id: a.occurrence_id)
|
||||||
|
next unless occurrences.map(&:slot_duration).uniq.size > 1
|
||||||
|
|
||||||
|
duration = occurrences.map(&:slot_duration).uniq.detect { |e| !e.nil? }
|
||||||
|
occurrences.each do |o|
|
||||||
|
o.update_attributes(slot_duration: duration)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fab-manager",
|
"name": "fab-manager",
|
||||||
"version": "4.4.2",
|
"version": "4.4.3",
|
||||||
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
|
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"fablab",
|
"fablab",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user