aoz-003 merge requestshttps://git.panter.ch/open-source/aoz-003/-/merge_requests2023-11-08T12:51:49+01:00https://git.panter.ch/open-source/aoz-003/-/merge_requests/1367fix: document category select2023-11-08T12:51:49+01:00Jan Hricfix: document category selecthttps://support.panter.ch/#ticket/zoom/4587https://support.panter.ch/#ticket/zoom/4587Jan HricJan Hrichttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1344fix: responsive table2023-05-09T11:02:50+02:00Jakub Motyckafix: responsive tablehttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1348chore: add cert for production db2023-04-11T14:43:12+02:00Jakub Motyckachore: add cert for production dbhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1322Chores/analyse performance problems2023-01-20T11:24:29+01:00Kaspar Vollenweidervok@panter.chChores/analyse performance problems## Anzeige Gruppenangebote
Slow query triggered at:
[app/controllers/group_offers_controller.rb#L149](https://git.panter.ch/open-source/aoz-003/-/blob/60a4e0deefd1e8537ab3b59ce38b39f7f2d0486d/app/controllers/group_offers_controller.rb#...## Anzeige Gruppenangebote
Slow query triggered at:
[app/controllers/group_offers_controller.rb#L149](https://git.panter.ch/open-source/aoz-003/-/blob/60a4e0deefd1e8537ab3b59ce38b39f7f2d0486d/app/controllers/group_offers_controller.rb#L149)
[uses scope sorted_by_active_volunteer_count @ app/models/group_offer.rb#L86-98](https://git.panter.ch/open-source/aoz-003/-/blob/d2a05e9966f805dbf797084ed1c31ba569e9e01f/app/models/group_offer.rb#L86-98)
```ruby
[1] pry(#<GroupOffersController>)> @group_offers.explain
GroupOffer Load (11.1ms) SELECT group_offers.*, count(
CASE WHEN group_assignments.termination_verified_by_id IS NULL AND
active_storage_attachments.id IS NOT NULL AND
group_assignments.period_start IS NOT NULL THEN 1 ELSE NULL END
) as active_volunteer_count_sort FROM "group_offers" LEFT OUTER JOIN "group_assignments" ON "group_assignments"."deleted_at" IS NULL AND "group_assignments"."group_offer_id" = "group_offers"."id" LEFT OUTER JOIN "active_storage_attachments" ON "active_storage_attachments"."record_type" = $1 AND "active_storage_attachments"."name" = $2 AND "active_storage_attachments"."record_id" = "group_assignments"."id" WHERE "group_offers"."deleted_at" IS NULL AND ("group_offers"."period_end" IS NULL OR "group_offers"."period_end" = NULL) GROUP BY "group_offers"."id" ORDER BY "group_offers"."active" DESC, "group_offers"."created_at" DESC [["record_type", "GroupAssignment"], ["name", "pdf"]]
↳ (pry):7:in `init_sorts'
=> EXPLAIN for: SELECT group_offers.*, count(
CASE WHEN group_assignments.termination_verified_by_id IS NULL AND
active_storage_attachments.id IS NOT NULL AND
group_assignments.period_start IS NOT NULL THEN 1 ELSE NULL END
) as active_volunteer_count_sort FROM "group_offers" LEFT OUTER JOIN "group_assignments" ON "group_assignments"."deleted_at" IS NULL AND "group_assignments"."group_offer_id" = "group_offers"."id" LEFT OUTER JOIN "active_storage_attachments" ON "active_storage_attachments"."record_type" = $1 AND "active_storage_attachments"."name" = $2 AND "active_storage_attachments"."record_id" = "group_assignments"."id" WHERE "group_offers"."deleted_at" IS NULL AND ("group_offers"."period_end" IS NULL OR "group_offers"."period_end" = NULL) GROUP BY "group_offers"."id" ORDER BY "group_offers"."active" DESC, "group_offers"."created_at" DESC [["record_type", "GroupAssignment"], ["name", "pdf"]]
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=168.52..168.74 rows=87 width=481)
Sort Key: group_offers.active DESC, group_offers.created_at DESC
-> HashAggregate (cost=164.84..165.72 rows=87 width=481)
Group Key: group_offers.id
-> Hash Left Join (cost=50.70..162.14 rows=541 width=493)
Hash Cond: (group_assignments.id = active_storage_attachments.record_id)
-> Hash Right Join (cost=13.15..120.50 rows=541 width=493)
Hash Cond: (group_assignments.group_offer_id = group_offers.id)
-> Seq Scan on group_assignments (cost=0.00..103.93 rows=1280 width=28)
Filter: (deleted_at IS NULL)
-> Hash (cost=12.06..12.06 rows=87 width=473)
-> Seq Scan on group_offers (cost=0.00..12.06 rows=87 width=473)
Filter: ((deleted_at IS NULL) AND (period_end IS NULL))
-> Hash (cost=35.20..35.20 rows=188 width=16)
-> Bitmap Heap Scan on active_storage_attachments (cost=15.38..35.20 rows=188 width=16)
Recheck Cond: (((record_type)::text = 'GroupAssignment'::text) AND ((name)::text = 'pdf'::text))
-> Bitmap Index Scan on index_active_storage_attachments_uniqueness (cost=0.00..15.34 rows=188 width=0)
Index Cond: (((record_type)::text = 'GroupAssignment'::text) AND ((name)::text = 'pdf'::text))
(18 rows)
```
A version without the attachment in the sort would be quite a bit faster:
```ruby
active_assignment_count_select = <<-SQL.squish
group_offers.*, count(
CASE WHEN
group_assignments.termination_verified_by_id IS NULL
AND
group_assignments.period_start IS NOT NULL
THEN 1
ELSE NULL
END
) as active_volunteer_count_sort
SQL
direction = :desc if direction.blank?
left_joins(:group_assignments)
.select(active_assignment_count_select)
.group(:id)
.order(active_volunteer_count_sort: direction)
```
```ruby
[6] pry(#<GroupOffersController>)> @group_offers.explain
GroupOffer Load (6.1ms) SELECT group_offers.*, count( CASE WHEN group_assignments.termination_verified_by_id IS NULL AND group_assignments.period_start IS NOT NULL THEN 1 ELSE NULL END ) as active_volunteer_count_sort FROM "group_offers" LEFT OUTER JOIN "group_assignments" ON "group_assignments"."deleted_at" IS NULL AND "group_assignments"."group_offer_id" = "group_offers"."id" WHERE "group_offers"."deleted_at" IS NULL AND ("group_offers"."active" = TRUE AND ("group_offers"."period_end" IS NULL OR "group_offers"."period_end" = NULL)) GROUP BY "group_offers"."id" ORDER BY "group_offers"."active" DESC, "group_offers"."created_at" DESC
↳ (pry):14:in `init_sorts'
=> EXPLAIN for: SELECT group_offers.*, count( CASE WHEN group_assignments.termination_verified_by_id IS NULL AND group_assignments.period_start IS NOT NULL THEN 1 ELSE NULL END ) as active_volunteer_count_sort FROM "group_offers" LEFT OUTER JOIN "group_assignments" ON "group_assignments"."deleted_at" IS NULL AND "group_assignments"."group_offer_id" = "group_offers"."id" WHERE "group_offers"."deleted_at" IS NULL AND ("group_offers"."active" = TRUE AND ("group_offers"."period_end" IS NULL OR "group_offers"."period_end" = NULL)) GROUP BY "group_offers"."id" ORDER BY "group_offers"."active" DESC, "group_offers"."created_at" DESC
QUERY PLAN
----------------------------------------------------------------------------------------------
Sort (cost=122.19..122.27 rows=35 width=481)
Sort Key: group_offers.active DESC, group_offers.created_at DESC
-> HashAggregate (cost=120.94..121.29 rows=35 width=481)
Group Key: group_offers.id
-> Hash Right Join (cost=12.50..119.85 rows=217 width=485)
Hash Cond: (group_assignments.group_offer_id = group_offers.id)
-> Seq Scan on group_assignments (cost=0.00..103.93 rows=1280 width=20)
Filter: (deleted_at IS NULL)
-> Hash (cost=12.06..12.06 rows=35 width=473)
-> Seq Scan on group_offers (cost=0.00..12.06 rows=35 width=473)
Filter: ((deleted_at IS NULL) AND active AND (period_end IS NULL))
(11 rows)
```Kaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.chhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1315Draft: feat: pdf heroku2022-12-22T11:05:12+01:00Jan HricDraft: feat: pdf herokuswitch to heroku pdf library - reduced slug size by 200MBswitch to heroku pdf library - reduced slug size by 200MBJan HricJan Hrichttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1298fix: groups offers test2022-12-06T11:04:28+01:00Jakub Motyckafix: groups offers testhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1295fix: groups offers pdf test2022-12-05T22:15:47+01:00Jakub Motyckafix: groups offers pdf testhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1296Feat/common components users test2022-12-05T17:30:12+01:00Jakub MotyckaFeat/common components users testhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1290Draft: Feat/common components node162022-11-29T23:07:40+01:00Jakub MotyckaDraft: Feat/common components node16https://git.panter.ch/open-source/aoz-003/-/merge_requests/1289Draft: Feat/stzh component node162022-11-29T14:17:30+01:00Jakub MotyckaDraft: Feat/stzh component node16https://git.panter.ch/open-source/aoz-003/-/merge_requests/1129WIP: feat: add client acceptance invited2021-10-26T13:02:36+02:00Jakub MotyckaWIP: feat: add client acceptance invitedhttps://trello.com/c/IOSiQmQQ/211-neuer-status-f%C3%BCr-klienten
DON'T MERGE REQUIRES THIS:
https://trello.com/c/Lkm5fZmE/260-handling-of-clients-in-state-eingeladenhttps://trello.com/c/IOSiQmQQ/211-neuer-status-f%C3%BCr-klienten
DON'T MERGE REQUIRES THIS:
https://trello.com/c/Lkm5fZmE/260-handling-of-clients-in-state-eingeladenhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1100quickfix: webdrivers gem require failer on deployment2021-08-02T11:33:25+02:00Jakub Motyckaquickfix: webdrivers gem require failer on deploymentCapistrano deployment error:
LoadError: cannot load such file -- webdrivers/chromedriverCapistrano deployment error:
LoadError: cannot load such file -- webdrivers/chromedriverhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1090replace autocomplete_rails gem with jquery plugin devbridge-autocomplete2021-06-29T14:22:36+02:00Jiri Strojilreplace autocomplete_rails gem with jquery plugin devbridge-autocompleteI only fetch the dependency with yarn here. This is NOT an introduction of webpacker assets!I only fetch the dependency with yarn here. This is NOT an introduction of webpacker assets!https://git.panter.ch/open-source/aoz-003/-/merge_requests/1087Minor maintenance updates2021-04-30T17:38:50+02:00Kaspar Vollenweidervok@panter.chMinor maintenance updatesKaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.chhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1085Draft: Fix mimemagic problem2021-04-30T16:17:29+02:00Kaspar Vollenweidervok@panter.chDraft: Fix mimemagic problemmimemagic 0.3.5 pin prevents `bundle install` to work
```sh
$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Your bundle is locked to mimemagic (0.3.5) from rubygems repository https:/...mimemagic 0.3.5 pin prevents `bundle install` to work
```sh
$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Your bundle is locked to mimemagic (0.3.5) from rubygems repository https://rubygems.org/ or installed locally, but that version can no longer be found in that source. That means the author of mimemagic (0.3.5)
has removed it. You'll need to update your bundle to a version other than mimemagic (0.3.5) that hasn't been removed in order to install.
```Kaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.chhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1082Deploy to production 2021 02 19 no22021-02-19T18:53:33+01:00Kaspar Vollenweidervok@panter.chDeploy to production 2021 02 19 no2Kaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.chhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1060Draft: Mailtext fur sozialarbeiter mail bei anmeldung uber vorlagen editierbar2020-12-02T10:58:29+01:00Kaspar Vollenweidervok@panter.chDraft: Mailtext fur sozialarbeiter mail bei anmeldung uber vorlagen editierbarhttps://trello.com/c/1HMXRuKb/194-mailtext-f%C3%BCr-sozialarbeiter-mail-bei-anmeldung-%C3%BCber-vorlagen-editierbarhttps://trello.com/c/1HMXRuKb/194-mailtext-f%C3%BCr-sozialarbeiter-mail-bei-anmeldung-%C3%BCber-vorlagen-editierbarKaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.chhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1065Less important minor default group updates2020-12-02T10:58:19+01:00Kaspar Vollenweidervok@panter.chLess important minor default group updatesKaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.chhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1068Deploy minor changes to production2020-12-01T09:39:24+01:00Kaspar Vollenweidervok@panter.chDeploy minor changes to productionKaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.chhttps://git.panter.ch/open-source/aoz-003/-/merge_requests/1046WIP: Rails 6 upgrade2020-05-26T11:41:38+02:00Kaspar Vollenweidervok@panter.chWIP: Rails 6 upgradeKaspar Vollenweidervok@panter.chKaspar Vollenweidervok@panter.ch