OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[32180] Fix invalid version diff number
Oliver Günther8a066ae425dc
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rbindex df7b4d1c206..aabd7062d2d 100644--- a/app/mailers/user_mailer.rb+++ b/app/mailers/user_mailer.rb@@ -211,8 +211,7 @@ class UserMailer < BaseMaileraction: :diff,project_id: wiki_content.project,id: wiki_content.page.slug,- # using wiki_content.version + 1 because at this point the journal is not saved yet- version: wiki_content.version + 1)+ version: wiki_content.version)open_project_headers 'Project' => @wiki_content.project.identifier,'Wiki-Page-Id' => @wiki_content.page.id,diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rbindex ec5d3934e3a..b7d117a9fff 100644--- a/spec/mailers/user_mailer_spec.rb+++ b/spec/mailers/user_mailer_spec.rb@@ -174,7 +174,7 @@ describe UserMailer, type: :mailer doit_behaves_like 'mail is sent'it 'should link to the latest version diff page' do- expect(ActionMailer::Base.deliveries.first.body.encoded).to include 'diff/2'+ expect(ActionMailer::Base.deliveries.first.body.encoded).to include 'diff/1'endit_behaves_like 'does only send mails to author if permitted'