283 Commits

Author SHA1 Message Date
Henne Vogelsang
988b3bf689 Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
Henne Vogelsang
928e590a47 Fix column limits
Has set a limit of 0, which makes little sense...
2024-12-02 11:41:01 +01:00
Henne Vogelsang
81cdec6633 First remove reference, then drop table... 2024-11-22 14:15:05 +01:00
Henne Vogelsang
b9a50ef20d Drop Organization from database
Rolling back this feature. It was a nice attempt but no one ever followed up
and made this something else than a code of conduct holder...
2024-06-07 16:11:25 +02:00
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
Rishabh Singh
85e3184361 Update schema.rb formatting 2019-07-21 15:11:53 +05:30
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
ViditChitkara
0ec937e43e fixed failing tests 2018-01-23 18:26:03 -08: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
AEtherC0r3
efaf07178f Upgrade to Rails 5
Update config with rails app:update
Update schema.rb rails db:migrate
Add puma
Make jobs and models inherit from ApplicationJob and ApplicationRecord
Update acts_as_list to 0.9.7 in order to fix
"undefined method `sanitize_sql_hash_for_conditions'" error
Update web-console to 2.3.0 to fix a 500 internal server error
Replace before_filter with before_action
Add rails-controller-testing gem
Add prepend: :true to protect_from_forgery in ApplicationController to
avoid ActionController::InvalidAuthenticityToken exceptions
Remove activeuuid
Update formtastic to 3.1.5 to fix deprecation warnings and issues
with the Input class
Update ahoy_matey to 1.6.0
Update cancancan to 2.0.0 to fix issues with malformed sql queries
Fix program spec
Fix issue with the picture being nil in admin/Organizations#new and #edit
and Organizations#show
Fix ActiveRecord::Base.raise_in_transactional_callbacks= deprecation
warning by removing an unnecessary line in application.rb
Fix failing versions specs
2017-12-11 20:58:04 +02:00
Naman Gupta
e32837b3b1 schema is added 2017-11-17 00:41:20 +05:30
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