Commit 3b0267da authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

Merge branch...

Merge branch 'fix/journal_entry_author_on_semester_review_taken_from_semester_process_creator' into 'develop'

fix: add semster process creator as journal author in case current_user is volunteer

See merge request !934
parents 057de166 fd97f48e
Pipeline #39396 passed with stage
in 37 minutes and 13 seconds
......@@ -46,7 +46,8 @@ class ReviewSemestersController < ApplicationController
return unless spv.commited_at?
volunteer = spv.volunteer
semester_feedbacks = spv.semester_feedbacks
Journal.create(user: current_user, journalable: volunteer,
author = current_user.volunteer? ? @semester_process_volunteer.semester_process.creator : current_user
Journal.create(user: author, journalable: volunteer,
category: :feedback, title: "Semester Prozess Feedback vom #{I18n.l(Time.zone.today)}: ",
body: render_semester_feedbacks(semester_feedbacks))
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment