Merge pull request #3596 from hennevogel/feature/ticket-reg-export

Put the ticket token into the registration export
This commit is contained in:
Henne Vogelsang 2025-08-14 11:58:09 +02:00 committed by GitHub
commit dd9dede062
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,7 +3,7 @@
wb = xlsx_package.workbook
wb.add_worksheet(name: 'registrations') do |sheet|
bold_style = wb.styles.add_style(b: true)
row = ['Attended', 'Name', 'Nickname', 'Affilιation', 'Email']
row = ['Attended', 'Name', 'Nickname', 'Affilιation', 'Email', 'Ticket Token']
@conference.questions.each do |question|
row << question.title
@ -18,6 +18,7 @@ wb.add_worksheet(name: 'registrations') do |sheet|
row << registration.nickname
row << registration.affiliation
row << registration.email
row << registration.user.physical_tickets.by_conference(@conference).first&.token
@conference.questions.each do |question|
qa = registration.qanswers.find_by(question: question)
answer = ( qa ? qa.answer.title : '' )