Project

General

Profile

Actions

Defect #40301

open

Issue - New version: Error when create a version with custom field of "File" type

Added by Morris Penasso 9 months ago. Updated 16 days ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Following this path:
Open existing issue -> Edit -> Target Version -> Create new one with green button.

I have a "File" custom field that is not required but when i try to save version after enter the name, the system say me that the custom field is not valid.
I try to delete it and create another one but i obtain the same error ( only with "File" custom field ).

System informations:

Environment:
Redmine version 5.1.0.stable
Ruby version 3.0.2-p107 (2021-07-07) [x86_64-linux-gnu]
Rails version 6.1.7.6
Environment production

SCM:
Mercurial 6.1.1
Git 2.34.1
Filesystem
Redmine plugins:
redmine_dmsf 3.1.3


Files

Actions #1

Updated by Morris Penasso 2 months ago

Any updates ?

When save "Custom file field", the name of file is not reported on summary.
The DMSF team has bugfix this bug: https://github.com/danmunn/redmine_dmsf/commit/79bc188c759681511c8ce37a7946237267ad3f17

But remain the bug writed on this issue.
The DMSF team say: "Custom field format File is Redmine's internal custom field and has nothing to do with DMSF plugin. The custom field related to DMSF is DMS Document rev."

Actions #2

Updated by Go MAEDA 2 months ago

I have confirmed the issue.

Actions #3

Updated by Takenori TAKAKI 25 days ago

Reviewing the HTML for the new version modal, I found enctype="multipart/form-data" was missing.
Adding :html => {:multipart => true} to versions/_new_modal.html.erb adds this attribute and enables successful version registration.

diff --git a/app/views/versions/_new_modal.html.erb b/app/views/versions/_new_modal.html.erb
index 052a739747..02c57abc4c 100644
--- a/app/views/versions/_new_modal.html.erb
+++ b/app/views/versions/_new_modal.html.erb
@@ -1,6 +1,6 @@
 <h3 class="title"><%=l(:label_version_new)%></h3>

-<%= labelled_form_for @version, :url => project_versions_path(@project), :remote => true do |f| %>
+<%= labelled_form_for @version, :url => project_versions_path(@project), :html => {:multipart => true}, :remote => true do |f| %>
 <%= render :partial => 'versions/form', :locals => { :f => f } %>
   <p class="buttons">
     <%= submit_tag l(:button_create), :name => nil %>
Actions #4

Updated by Go MAEDA 16 days ago

  • Target version set to 5.1.5
Actions

Also available in: Atom PDF