Commit graph

243 commits

Author SHA1 Message Date
Henne Vogelsang
9a04411f81
Merge pull request #2667 from AndrewKvalheim/fix-migration-non-null
Work around bug in migrations to non-null columns
2021-03-06 21:02:13 +01:00
Henne Vogelsang
c29d45beea
Merge pull request #2666 from AndrewKvalheim/fix-migration-carrierwave
Fix migration that fails on conferences without pictures
2021-03-06 21:00:38 +01:00
Andrew Kvalheim
fdd7806071
Work around bug in migrations to non-null columns
When running migration 20170705075039 followed by 20170715131706, the
latter fails due to lingering null values in a newly non-null column—

    Mysql2::Error: Invalid use of NULL value: ALTER TABLE `tracks` CHANGE `state` `state` varchar(255) DEFAULT 'new' NOT NULL
    db/migrate/20170715131706_make_track_state_not_null_and_add_default_value.rb:17:in `change'

—despite having apparently converted any existing null values prior to
changing the column type. Investigation reveals that actually the
attempted conversion has had no effect, and that this can be resolved by
clearing ActiveRecord internal caches between migrations:

    connection.schema_cache.clear_data_source_cache! 'tracks'

The same problem also affects running 20170705075039 followed by
20170720134353, but in that case it leads to silent data corruption as
`change_column_null` automatically converts any lingering null values.

This commit 1) clears ActiveRecord internal caches at the beginning of
each affected migration, and 2) replaces `change_column_null` with
`change_column` to reflect that no automatic conversion is intended.
2021-03-06 20:10:20 +01:00
Andrew Kvalheim
079f609603
Fix migration that fails on conferences without pictures
CarrierWave documentation:

> Note: `recreate_versions!` will throw an exception on records without
> an image. To avoid this, scope the records to those with images or
> check if an image exists within the block.

Resolves #1976:

    NoMethodError: undefined method `read' for nil:NilClass
    …/carrierwave-1.3.1/lib/carrierwave/uploader/cache.rb:81:in `sanitized_file'
    …/carrierwave-1.3.1/lib/carrierwave/uploader/cache.rb:118:in `cache!'
    …/carrierwave-1.3.1/lib/carrierwave/uploader/versions.rb:234:in `recreate_versions!'
    db/migrate/20171130172334_rebuild_conference_pictures.rb:4:in `block in up'
2021-03-06 20:08:15 +01:00
Andrew Kvalheim
5a890013ef
Annotate past migrations with Rails version
Many migrations currently fail to run with:

> Directly inheriting from ActiveRecord::Migration is not supported.
> Please specify the Rails release the migration was written for:
>
>     class Example < ActiveRecord::Migration[4.2]

I've annotated those that I need to run with the Rails version at the
time each was committed:

    rake db:migrate:status \
    | grep --perl-regexp --only-matching '(?<=^  down    )\d{14}' \
    | while read -r id; do
      path="$(ls -1 db/migrate/${id}_*.rb)"
      version="$(git show "$(git log --diff-filter=A --pretty=format:%H -- "$path")":Gemfile.lock \
        | grep --perl-regexp --only-matching '(?<=^    rails \()\d+\.\d+(?=(\.\d+)+\))')"
      sed --in-place -e "s/\(< ActiveRecord::Migration\)$/\\1[$version]/" "$path"
    done
2021-03-06 20:06:50 +01:00
James Mason
7a04f3582f
Remove travel schedule from registration
(cherry picked from commit d18cc02f0185df39bb4213d8a63a955dfb433dcb)
Re: https://github.com/openSUSE/osem/issues/2333
2021-03-06 04:09:02 +01:00
James Mason
03f7951676 Add a switch for allowing registration on events (proposals) 2018-12-19 13:18:24 -08:00
James Mason
43bef689fc Rubocop autocorrections 2018-11-16 09:06:05 -08:00
James Mason
a3adf8318d Add additional social media fields to contacts
+ YouTube
+ Blog

Simplify logic in the view, and refactor the test #BetterPlace
2018-11-14 15:01:03 +01:00
James Mason
b11001cdba Every campaign has an end.
Drop ahoy, because it's more trouble than it's worth. This means dropping
visits, campaigns, targets.

Campaigns are better run to analytics, such as:
* https://matomo.org/docs/tracking-campaigns/
* https://matomo.org/docs/tracking-goals-web-analytics/
* https://support.google.com/analytics/answer/1012040?hl=en
2018-10-16 21:34:04 +02:00
James Mason
ed6b2d8c93 Default to keeping user's email addresses private. 2018-09-25 22:11:38 +02:00
Stella Rouzi
da91ff8371 Add email for proposal submission 2018-09-19 21:25:12 +02:00
Stella Rouzi
683f62a27c Add more options for surveys
* Survey period constraints
* Add abilities
* Enforce required questions
* Update survey_submssion updated_at
* Do a full match of possible answer and user reply
2018-07-03 08:46:15 +03:00
Stella Rouzi
9f3c0eff5d Add surveys; custom generated by admins
Available during registration or after conference

Co-authored-by: Shyukri <shshyukriev@suse.com>
Co-authored-by: Henne <hvogel@opensuse.org>
Co-authored-by: Moises <mdeniz@suse.com>
2018-07-03 08:46:15 +03:00
Stella Rouzi
3bb73f27cf Fix ahoy tracking and visits 2018-07-02 09:42:40 -06:00
James Mason
24396d35c2 Use Ruby safe navigation over Rails try
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/SafeNavigation
2018-06-01 09:15:57 -07:00
James Mason
d8bd269a64 Add frozen_string_literal magic comment
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
2018-06-01 09:15:57 -07:00
James Mason
6d31dfeef4 Add frozen_string_literal magic comment
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
2018-05-09 06:54:26 -07:00
James Mason
03ef28e74d Require code of conduct acceptance on registration 2018-05-08 13:23:00 +02:00
James Mason
a6daff8582 Add/edit org code of conduct, as admin 2018-05-08 13:23:00 +02:00
James Mason
0d4c9e32cf Add timestamp columns to event_types
... required for Rails to calculate cache keys
2018-03-14 18:00:37 -07:00
James Mason
0865b39c38 Add timestamps to tickets
Resolves #1997
2018-03-14 23:57:52 +01:00
Jan-Frederik Rieckers
e1e0bdb4fc Add possibility to link to mastodon 2018-01-06 18:55:27 +01:00
Ronaq13
505d9da3d4 Fix Performance/HashEachMethods offenses
values.each and keys.each methods are depreciated, so they have replaced by
each_value and each_key respectively. This has done manually.

Closes https://github.com/openSUSE/osem/issues/1825
2017-12-18 17:30:37 +01:00
Stella Rouzi
4289f699ac Add enabled to event_schedules
To show scheduled events that have been cancelled/withdrawn as 'cancelled', and consequently also show when an event is their replacement.

admin/schedules#show does not show events that were scheduled and then cancelled/withdrawn, however a record in event_schedules exists for those events, but event_schedule.enabled = false
2017-12-15 12:31:58 -08:00
James Mason
e01d849374 Add a picture format for conference tickets 2017-12-11 17:11:15 -08:00
AEtherC0r3
364be55412 Change visit_id type of ahoy_events to integer
The id column of the visits table is of type integer
2017-12-11 20:58:04 +02:00
ViditChitkara
bd045c2976 added description field to cfps
closes #1650

done some changes

minor changes

added markdown format to cfp#show

fixed description text  position in proposals

fixed truncated description text in show action

minor changes on non-admin side
2017-11-14 17:31:08 +02:00
rahul
b761e83b45 Add amount paid
Amount paid colum is added to ticket purchase to keep the record of money paid by the user.
It is added to physical_ticket#index to show admin, price paid by each user for each ticket.
2017-10-14 23:06:57 +05:30
AEtherC0r3
7eea930269 Implement track scheduling
Add track association to schedule
Show schedules in admin sidebar to track organizers
Allow track organizers to manage the schedules of their tracks
Don't allow self-organized track events to be dragged or unscheduled in
a conference schedule
Make scheduled events of self-organized tracks appear semitransparent in
conference schedules
Make the rooms of confirmed self_organized tracks appear semitransparent
and don't allow events to be scheduled to it in the conference schedules
during the dates of its track
Create admin/SchedulesController#new action
Add a button in admin/Schedules#index to create schedules for tracks
Add self_organized scope to Track
Modify Schedules#show to handle track schedules and show a unified
schedule
Allow track organizers to create new schedules for their tracks
Correctly identify scheduled and unscheduled events in Schedules#events
Fix Event#room and Event#time for when the event is scheduled in a track
schedule
Modify Program#selected_event_schedules to include the event_schedules
of selected track schedules
Modify Track#revoke_role_and_cleanup to destroy the track's schedules
and revert its events' state to new
Add tabs for conference and track schedules in admin/Schedules#index
Add button to Create/Show a tracks schedule in Tracks#index and #show
Fix concurrent_events in application_helper because of changes in
Program#selected_event_schedules
Do not take into account cfp_active in Event#valid_track
Modify EventsController#get_tracks accordingly
Enforce cfp_active of track to be enabled for proposals in
ProposalsController#create and #update
Add support for multiple schedules per track
Add selected_schedule_id to Track
Load EventSchedules of selected track schedules for conference schedules
in admin/SchedulesController#show
Modify SchedulesController#show to take into account only the selected
track schedules
Create Event#selected_schedule_id and use it in Event#scheduled? and
Event#time
Validate that an EventSchedule for an event of a self-organized track
belongs to one of the track's schedules
Add 'Manage' button in Tracks#index, #show that sends you to the admin
side of things
Add admin/TracksController#update_selected_schedule to update the
selected_schedule_id of tracks
2017-08-26 00:31:44 +03:00
shlok007
0ac5d18ef2 route to conference#show for custom domain 2017-08-22 21:18:58 +00:00
nasia
e73218b5ca Add booth limit 2017-08-18 23:41:38 +03:00
nasia
8b5ebb3dd7 Add confirmed booths to splashpage 2017-08-16 16:51:52 +03:00
nasia
7107f9a35f Add emails for booth's acceptance and rejection 2017-08-14 22:34:17 +03:00
AEtherC0r3
2ff4c6d6b2 Add relevance field for track requests
The requester can now provide more info about the track and himself
2017-08-11 16:25:21 +03:00
AEtherC0r3
d9faffc96a Implement track request acceptance
Allow track submitter to request specific dates
Redirect to Tracks#edit if a track doesn't have a room or start/end date
before accepting it

Don't allow the submitter or the track organizers to edit the request
after it has been accepted or confirmed

Restrict track selection in proposals and move track selection from
Proposals form to events helper

Mark cfp_active of the tracks table as not null and fill in true if nil
2017-08-11 16:25:21 +03:00
AEtherC0r3
0f154d07c9 Mark track state as not null and add default value
The regular tracks are marked as 'confirmed'
2017-08-11 16:25:21 +03:00
AEtherC0r3
fd93b04f16 Add room and dates to tracks
They are required only for accepted and confirmed self-organized tracks
2017-08-11 16:25:21 +03:00
siddhantbajaj
f31651ad9c Added registration-ticket
Added registration type tickets that will used in the check-in process
2017-08-10 21:15:54 +05:30
siddhantbajaj
9e154a1dcd Added Token field for physical_ticket
Added token field in physical_ticket model. This token will also be stored in the qr code and will uniqely identify the ticket.
2017-07-24 16:58:36 +05:30
nasia
f7c0b64eb5 Introduce Booths for admin 2017-07-18 14:18:42 +03:00
AEtherC0r3
9c58397cd2 Enable Style/IndentationWidth cop
The offenses were fixed manually
2017-07-14 12:47:20 +03:00
AEtherC0r3
68fc750e9f Implement track requests and add the track organizer role
About track requests:
Create migration that adds the fields submitter_id, state, and
cfp_active to Tracks
Add validations and the self_organized? method to the Track model
Create a new TracksController outide of the admin namespace
Create the relevant views for index, show, new and edit
Modify the admin views for tracks to include extra info for
self-organized tracks

About track organizers:
Create the role when a self-organized track is created
Define track organizer abilities
Modify the roles views and controller to handle the new role

The route for Roles#edit needs to have higher priority than the nested
routes for track roles, otherwise, the word edit in the url is matched
as a track with short_name edit
2017-07-14 12:38:53 +03:00
siddhantbajaj
c066aadae2 Added TicketScanning Model 2017-07-11 17:05:07 +05:30
shlok007
b33e9ed28e fix revision count and drop observers 2017-07-09 03:36:57 +05:30
shlok007
9c6286182e caching comment counts 2017-07-09 01:57:44 +05:30
siddhantbajaj
dd52a9b2ab Make ticket layout configurable
Added option for conference organizer to switch between ticket layouts (horizontal or vertical). Added test for the same.
2017-07-07 14:19:51 +05:30
AEtherC0r3
95fbd10153 Friendly urls for tracks
Don't use tracks ids in urls
Add short_name to tracks and use that in urls as the identifier
2017-07-04 20:42:10 +03:00
AEtherC0r3
c3eb178546 Modify CFP to accept proposals for other things
Add field cfp_type and relevant validations
Add Program#cfp to preserve backwards compatibility
Add 'for_events' scope to the cfp, in order for it to be used like
program.cfps.events
Add useful methods
Add rspec test for the new code
The supported cfp types can be viewed via Cfp::TYPES
2017-06-27 21:16:46 +03:00
Siddhant Bajaj
5c56683ae8 Introduced Physical Ticket
Added PhysicalTicket model and controller. It holds the information about each physical ticket bought at the purchase. Physical Tickets are created after every successfull payment.
2017-06-22 19:50:55 +05:30