500 Error when doing Approval Workflow related actions #1260
This commit is contained in:
parent
8c30cb4046
commit
86059bab52
@ -640,7 +640,7 @@ class DmsfController < ApplicationController
|
||||
recipients = DmsfMailer.deliver_files_deleted(@project, deleted_files)
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
if recipients.any?
|
||||
to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
@ -650,7 +650,7 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
end
|
||||
unless not_deleted_files.empty?
|
||||
flash[:warning] = l(:warning_some_entries_were_not_deleted, entries: not_deleted_files.map{ |f| h(f.title) }.
|
||||
flash[:warning] = l(:warning_some_entries_were_not_deleted, entries: not_deleted_files.map{ |f| f.title }.
|
||||
join(', '))
|
||||
end
|
||||
# Links
|
||||
|
||||
@ -150,7 +150,7 @@ class DmsfFilesController < ApplicationController
|
||||
@file.name = revision.name
|
||||
|
||||
if revision.save
|
||||
revision.assign_workflow(params[:dmsf_workflow_id])
|
||||
revision.assign_workflow params[:dmsf_workflow_id]
|
||||
if upload
|
||||
begin
|
||||
FileUtils.mv upload.tempfile_path, revision.disk_file(false)
|
||||
@ -178,7 +178,7 @@ class DmsfFilesController < ApplicationController
|
||||
recipients = DmsfMailer.deliver_files_updated(@project, [@file])
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
if recipients.any?
|
||||
to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
@ -208,7 +208,7 @@ class DmsfFilesController < ApplicationController
|
||||
recipients = DmsfMailer.deliver_files_deleted(@project, [@file])
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
if recipients.any?
|
||||
to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
|
||||
@ -84,7 +84,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
:text_email_to_see_history)
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
unless recipients.blank?
|
||||
to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
@ -105,7 +105,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
action.note)
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
unless recipients.blank?
|
||||
to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
@ -126,7 +126,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
action.note,
|
||||
action.dmsf_workflow_step_assignment.dmsf_workflow_step)
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
flash[:warning] = l(:warning_email_notifications, to: h(delegate.name))
|
||||
flash[:warning] = l(:warning_email_notifications, to: delegate.name)
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -164,7 +164,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
recipients.uniq!
|
||||
recipients = recipients & DmsfMailer.get_notify_users(@project, [revision.dmsf_file], true)
|
||||
unless recipients.empty?
|
||||
to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user