Merge branch 'devel-2.0.1'

This commit is contained in:
Karel Pičman 2022-05-13 13:20:25 +02:00
commit 7e34510072
3 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,14 @@
Changelog for Custom Workflows
==============================
2.0.1 *2022-05-13*
------------------
Ruby 2.7 backward compatibility
* Bug: #257 - IssueRelation.to_s is broken after #257 bug
* Bug: #258 - Tried to create Proc object without a block
2.0.0 *2022-04-27*
------------------

View File

@ -1,7 +1,7 @@
Custom Workflows plug-in
========================
The current version of Redmine CustomWorkflows is **2.0.0**
The current version of Redmine CustomWorkflows is **2.0.1**
[![pipeline status](https://gitlab.kontron.com/redmine-plugins/redmine_custom_workflows/badges/master/pipeline.svg)](https://gitlab.kontron.com/redmine-plugins/redmine_custom_workflows/-/commits/master)
[![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine)

View File

@ -36,7 +36,15 @@ module RedmineCustomWorkflows
alias_method :old_to_s, :to_s
def to_s(issue=nil)
block_given? ? old_to_s(issue, &Proc.new {}) : old_to_s(issue)
if block_given?
if Gem.ruby_version < Gem::Version.new('3.0')
old_to_s issue, &Proc.new
else
old_to_s issue, &Proc.new {}
end
else
old_to_s issue
end
rescue NoMethodError => e
if issue_from.present? || issue_to.present?
raise e