Skip to content

Commit

Permalink
Merge pull request #438 from ChicagoWorldcon/staging
Browse files Browse the repository at this point in the history
v1.5.2 release
  • Loading branch information
balen authored Jul 15, 2022
2 parents 8e15a91 + 8a6ebbd commit 91d3fa0
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ rake docker:stop
You will be able to access the running server via http://localhost:3000 and
a test user will available ([email protected] with password 111111)


NOTE: there is a encrypted key for devise (used for login). You will need
a copy of the `master.key` file. This is not in source code control. When you get it, move it to `config/master.key`

NOTE: the docker image will use the files from the project directory.
So editing those files will affect what is running in docker (and most
changes can be seen by refreshing the page you are working on)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/reports/session_reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def session_with_no_moderator
session.title,
session.area_list.sort.join(';'),
session.start_time ? FastExcel.date_num(session.start_time, session.start_time.in_time_zone.utc_offset) : nil,
session.format.name,
session.format&.name,
session.session_assignments.select{|a| a.session_assignment_role_type_id == participant.id}.collect{|a| a.person.published_name}.join(';'),
session.session_assignments.select{|a| a.session_assignment_role_type_id == reserve.id}.collect{|a| a.person.published_name}.join(';')
],
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def sessions_with_participants
worksheet.append_row(
[
session.title,
session.format.name,
session.format&.name,
session.area_list.sort.join(';'),
session.session_assignments.select{|a| a.session_assignment_role_type_id == moderator.id}.collect{|a| a.person.published_name}.join(';'),
session.session_assignments.select{|a| a.session_assignment_role_type_id == participant.id}.collect{|a| a.person.published_name}.join(';'),
Expand Down
4 changes: 0 additions & 4 deletions app/lib/migration_helpers/plano_views.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def self.create_person_schedules
p.con_state,
p.can_share,
p.pronouns,
em.email,
sa.id as session_assignment_id,
sart.id as session_assignment_role_type_id,
sart.name as session_assignment_name,
Expand All @@ -53,9 +52,6 @@ def self.create_person_schedules
join
people p on
p.id = sa.person_id
join
email_addresses em on
em.person_id = p.id and em.isdefault
left join
sessions
on sessions.id = sa.session_id
Expand Down
8 changes: 8 additions & 0 deletions app/models/person_schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ class PersonSchedule < ApplicationRecord
belongs_to :room
belongs_to :format

# has_many :email_addresses, dependent: :destroy, foreign_key: :conflict_session_id
has_one :primary_email,
-> { where(['email_addresses.isdefault = true']) },
class_name: 'EmailAddress',
primary_key: 'person_id',
foreign_key: 'person_id'


# has_many :participant_assignments, class_name: 'SessionAssignment', primary_key: 'session_id', foreign_key: 'session_id'
has_many :moderators, -> (object) {
where("session_assignment_name in (?)",['Moderator'])
Expand Down
6 changes: 3 additions & 3 deletions app/serializers/person_schedule_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ class PersonScheduleSerializer

# Check if person is included in here
attribute :moderators do |object|
object.moderators.collect{|p| {published_name: p.published_name, email: p.can_share ? p.email: nil, pronouns: p.pronouns}}
object.moderators.collect{|p| {published_name: p.published_name, email: p.can_share ? p.primary_email&.email : nil, pronouns: p.pronouns}}
end

attribute :participants do |object|
object.participants.collect{|p| {published_name: p.published_name, email: p.can_share ? p.email: nil, pronouns: p.pronouns}}
object.participants.collect{|p| {published_name: p.published_name, email: p.can_share ? p.primary_email&.email : nil, pronouns: p.pronouns}}
end

attribute :invisibles do |object|
object.invisibles.collect{|p| {published_name: p.published_name, email: p.can_share ? p.email: nil, pronouns: p.pronouns}}
object.invisibles.collect{|p| {published_name: p.published_name, email: p.can_share ? p.primary_email&.email : nil, pronouns: p.pronouns}}
end
end
2 changes: 1 addition & 1 deletion app/services/session_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def self.draft_schedule_for(person:, current_person: nil)
'areas_list.area_list'
)
.joins(joins)
.eager_load(:room, :format)
.eager_load(:room, :format, :primary_email)
.where(person_id: person.id)
.where("start_time is not null and room_id is not null")
.where("con_state != 'declined' AND con_state != 'rejected'")
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This software is open source! If you'd like to contribute, please email planoram

[Planorama Data Privacy & Protection Policy](/planorama/privacy)

Production version: 1.5.1
Production version: 1.5.2

Staging version: 1.5.1
Staging version: 1.5.2

<script type="text/javascript" src="https://chicon-planorama.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/r5gghz/b/3/bc54840da492f9ca037209037ef0522a/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=816c99a7"></script>

0 comments on commit 91d3fa0

Please sign in to comment.