Skip to content

Commit 75ced8f

Browse files
committed
Merge branch 'dev' for release 6.3.0
2 parents 60da6a8 + cba3805 commit 75ced8f

35 files changed

+320
-161
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ yarn-debug.log*
7777
/yarn-error.log
7878
yarn-debug.log*
7979
.yarn-integrity
80+
81+
*.sql
82+
*.tar.gz

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog Fab-manager
22

3+
## v6.3.0 2023 November 3
4+
5+
- Fix a bug: fix all failing tasks of rake task file chain.rake
6+
- Fix a bug: file_size_validator.rb was broken since ruby v3, see https://github.com/rails/rails/issues/41270
7+
- improvement: pre-registration event reservations ilimit places
8+
- improvement: add including_deleted_users param for open api users
9+
- decreases sidekiq concurrency from 25 to 5, 25 is too much and consumes memory for nothing
10+
- do not log Notifications#polling action anymore, by default, can be enable via env variable ENABLE_NOTIFICATIONS_POLLING_LOGGING=true
11+
- Fix a bug: api/products/index bug when sorting by amount
12+
- adds a rake task to regenerate invoices by ids (see maintenance.rake)
13+
- Fix a bug: replaces custom ServerLocale middleware with sidekiq i18n middleware
14+
- adds a rake task to erase all reservations and invoices (fablab:maintenance:delete_all_reservations_and_invoices)
15+
- improvement: dynamic label (i18n) for stats structure tables
16+
317
## v6.2.0 2023 October 13
418

519
- Fix a bug: fix ReservationReminderWorker, was sending reservation reminder to users with a event reservation not validated by admin + adds tests for all scenarios

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,4 @@ gem 'sentry-ruby'
153153
gem "reverse_markdown"
154154

155155
gem "ancestry"
156+
gem 'silencer', require: false

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ GEM
462462
concurrent-ruby (~> 1.0, >= 1.0.5)
463463
sidekiq (>= 5.0, < 8.0)
464464
thor (>= 0.20, < 3.0)
465+
silencer (2.0.0)
465466
simplecov (0.19.0)
466467
docile (~> 1.1)
467468
simplecov-html (~> 0.11)
@@ -611,6 +612,7 @@ DEPENDENCIES
611612
sidekiq (>= 6.0.7)
612613
sidekiq-scheduler
613614
sidekiq-unique-jobs (~> 7.1.23)
615+
silencer
614616
spring (~> 4)
615617
spring-watcher-listen (~> 2.1.0)
616618
stripe (= 5.29.0)

app/controllers/api/notifications_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ def last_unread
5252

5353
def polling
5454
@notifications = current_user.notifications
55-
.with_valid_notification_type
56-
.where('notifications.is_read = false AND notifications.created_at >= :date', date: params[:last_poll])
57-
.order('notifications.created_at DESC')
55+
.with_valid_notification_type
56+
.where('notifications.is_read = false AND notifications.created_at >= :date', date: params[:last_poll])
57+
.order('notifications.created_at DESC')
5858
@totals = {
5959
total: current_user.notifications.with_valid_notification_type.delivered_in_system(current_user).count,
6060
unread: current_user.notifications.with_valid_notification_type.delivered_in_system(current_user).where(is_read: false).count

app/controllers/open_api/v1/users_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ class OpenAPI::V1::UsersController < OpenAPI::V1::BaseController
77
expose_doc
88

99
def index
10-
@users = User.order(created_at: :desc).includes(:group, :profile, :invoicing_profile)
10+
@users = InvoicingProfile.order(created_at: :desc).includes(user: %i[group profile statistic_profile])
11+
12+
@users = @users.where.not(user_id: nil) if params[:including_deleted_users].blank?
1113

1214
if params[:email].present?
1315
email_param = params[:email].is_a?(String) ? params[:email].downcase : params[:email].map(&:downcase)

app/doc/open_api/v1/users_doc.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class OpenAPI::V1::UsersDoc < OpenAPI::V1::BaseDoc
1818
param :email, [String, Array], optional: true, desc: 'Filter users by *email* using strict matching.'
1919
param :user_id, [Integer, Array], optional: true, desc: 'Filter users by *id* using strict matching.'
2020
param :created_after, DateTime, optional: true, desc: 'Filter users to accounts created after the given date.'
21+
param :including_deleted_users, [true, false], optional: true, desc: 'Filter users to accounts deleted or not.'
2122
example <<-USERS
2223
# /open_api/v1/users?page=1&per_page=4
2324
{

app/frontend/src/javascript/controllers/events.js.erb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,9 +1023,6 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
10231023
});
10241024
resetEventReserve();
10251025
});
1026-
if ($scope.currentUser.role === 'admin') {
1027-
return $scope.ctrl.member = null;
1028-
}
10291026
};
10301027

10311028
/**

app/frontend/templates/admin/events/reservations.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ <h1>{{ 'app.admin.event_reservations.the_reservations' | translate }} {{event.ti
6060
<div ng-if="!isCancelled(reservation) && !reservation.is_paid">
6161
<label class="m-r-sm">
6262
<span translate>{{ 'app.admin.event_reservations.negative' }}</span>
63-
<input type="radio" name="invalidate-{{reservation.id}}" ng-value="false" ng-click="invalidateReservation(reservation)" ng-model="reservation.slots_reservations_attributes[0].is_valid" ng-disabled="reservation.total_booked_seats > event.nb_free_places && !reservation.slots_reservations_attributes[0].is_valid">
63+
<input type="radio" name="invalidate-{{reservation.id}}" ng-value="false" ng-click="invalidateReservation(reservation)" ng-model="reservation.slots_reservations_attributes[0].is_valid" ng-disabled="reservation.slots_reservations_attributes[0].is_valid === 'false'">
6464
</label>
6565
<label>
6666
<span translate>{{ 'app.admin.event_reservations.affirmative' }}</span>

app/models/chained_element.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
class ChainedElement < ApplicationRecord
88
belongs_to :element, polymorphic: true
99
belongs_to :previous, class_name: 'ChainedElement'
10-
has_one :next, class_name: 'ChainedElement', inverse_of: :previous, dependent: :restrict_with_exception
1110

1211
before_create :set_content, :chain_record
1312

0 commit comments

Comments
 (0)