Add document revision.patch_version #1151
This commit is contained in:
parent
53582a46c4
commit
e9a8375911
@ -103,21 +103,16 @@ class DmsfFilesController < ApplicationController
|
||||
revision.name = params[:dmsf_file_revision][:name]
|
||||
revision.description = params[:dmsf_file_revision][:description]
|
||||
revision.comment = params[:dmsf_file_revision][:comment]
|
||||
|
||||
revision.dmsf_file = @file
|
||||
last_revision = @file.last_revision
|
||||
revision.source_revision = last_revision
|
||||
revision.user = User.current
|
||||
|
||||
revision.major_version = last_revision.major_version
|
||||
revision.minor_version = last_revision.minor_version
|
||||
version = params[:version].to_i
|
||||
if version == 3
|
||||
revision.major_version = DmsfUploadHelper::db_version(params[:custom_version_major])
|
||||
revision.minor_version = DmsfUploadHelper::db_version(params[:custom_version_minor])
|
||||
else
|
||||
revision.increase_version(version)
|
||||
end
|
||||
# Version
|
||||
revision.major_version = DmsfUploadHelper::db_version(params[:version_major])
|
||||
revision.minor_version = DmsfUploadHelper::db_version(params[:version_minor])
|
||||
revision.patch_version = DmsfUploadHelper::db_version(params[:version_patch])
|
||||
|
||||
file_upload = params[:dmsf_attachments]['1'] if params[:dmsf_attachments].present?
|
||||
if file_upload
|
||||
upload = DmsfUpload.create_from_uploaded_attachment(@project, @folder, file_upload)
|
||||
@ -144,7 +139,6 @@ class DmsfFilesController < ApplicationController
|
||||
|
||||
@file.name = revision.name
|
||||
ok = true
|
||||
|
||||
if revision.save
|
||||
revision.assign_workflow params[:dmsf_workflow_id]
|
||||
if upload
|
||||
|
||||
@ -30,7 +30,7 @@ module DmsfHelper
|
||||
unless Redmine::Plugin.installed?(:easy_extensions)
|
||||
|
||||
def late_javascript_tag(content_or_options_with_block = nil, html_options = {}, &block)
|
||||
javascript_tag content_or_options_with_block, html_options, &block
|
||||
javascript_tag content_or_options_with_block, html_options, &block
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -35,16 +35,10 @@ module DmsfUploadHelper
|
||||
link = DmsfLink.find_link_by_file_name(project, folder, name)
|
||||
file = link.target_file if link
|
||||
end
|
||||
|
||||
if file
|
||||
if file.last_revision
|
||||
last_revision = file.last_revision
|
||||
new_revision.source_revision = last_revision
|
||||
new_revision.major_version = last_revision.major_version
|
||||
new_revision.minor_version = last_revision.minor_version
|
||||
else
|
||||
new_revision.minor_version = 0
|
||||
new_revision.major_version = 0
|
||||
end
|
||||
else
|
||||
file = DmsfFile.new
|
||||
@ -52,32 +46,20 @@ module DmsfUploadHelper
|
||||
file.name = name
|
||||
file.dmsf_folder = folder
|
||||
file.notification = Setting.plugin_redmine_dmsf['dmsf_default_notifications'].present?
|
||||
new_revision.minor_version = 0
|
||||
new_revision.major_version = 0
|
||||
end
|
||||
|
||||
if file.locked_for_user?
|
||||
failed_uploads.push file
|
||||
next
|
||||
end
|
||||
|
||||
new_revision.dmsf_file = file
|
||||
new_revision.user = User.current
|
||||
new_revision.name = name
|
||||
new_revision.title = commited_file[:title]
|
||||
new_revision.description = commited_file[:description]
|
||||
new_revision.comment = commited_file[:comment]
|
||||
if commited_file[:version].present?
|
||||
version = commited_file[:version].is_a?(Array) ? commited_file[:version][0].to_i : commited_file[:version].to_i
|
||||
else
|
||||
version = 1
|
||||
end
|
||||
if version == 3
|
||||
new_revision.major_version = DmsfUploadHelper::db_version(commited_file[:custom_version_major])
|
||||
new_revision.minor_version = DmsfUploadHelper::db_version(commited_file[:custom_version_minor])
|
||||
else
|
||||
new_revision.increase_version(version)
|
||||
end
|
||||
new_revision.major_version = commited_file[:version_major].present? ? DmsfUploadHelper::db_version(commited_file[:version_major]) : 1
|
||||
new_revision.minor_version = commited_file[:version_minor].present? ? DmsfUploadHelper::db_version(commited_file[:version_minor]) : 0
|
||||
new_revision.patch_version = commited_file[:version_patch].present? ? DmsfUploadHelper::db_version(commited_file[:version_patch]) : nil
|
||||
new_revision.mime_type = commited_file[:mime_type]
|
||||
new_revision.size = commited_file[:size]
|
||||
new_revision.digest = commited_file[:digest]
|
||||
@ -177,27 +159,32 @@ module DmsfUploadHelper
|
||||
(0..999).to_a + [' ']
|
||||
end
|
||||
|
||||
class <<self
|
||||
alias_method :patch_version_select_options, :minor_version_select_options
|
||||
end
|
||||
|
||||
# 1 -> 2, -1 -> -2, A -> B
|
||||
def self.increase_version(version, number)
|
||||
return number if ((version == ' ') || ((-version) == ' '.ord))
|
||||
def self.increase_version(version)
|
||||
version ||= 0
|
||||
return 1 if ((version == ' ') || ((-version) == ' '.ord))
|
||||
if Integer(version)
|
||||
if version >= 0
|
||||
if (version + number) < 1000
|
||||
version + number
|
||||
if (version + 1) < 1000
|
||||
version + 1
|
||||
else
|
||||
version
|
||||
end
|
||||
else
|
||||
if -(version - number) < 'Z'.ord
|
||||
version - number
|
||||
if -(version - 1) < 'Z'.ord
|
||||
version - 1
|
||||
else
|
||||
version
|
||||
end
|
||||
end
|
||||
end
|
||||
rescue
|
||||
if (version.ord + number) < 'Z'.ord
|
||||
(version.ord + number).chr
|
||||
if (version.ord + 1) < 'Z'.ord
|
||||
(version.ord + 1).chr
|
||||
else
|
||||
version
|
||||
end
|
||||
@ -205,12 +192,14 @@ module DmsfUploadHelper
|
||||
|
||||
# 1 -> 1, -65 -> A
|
||||
def self.gui_version(version)
|
||||
return ' ' unless version
|
||||
return version if version >= 0
|
||||
(-version).chr
|
||||
end
|
||||
|
||||
# 1 -> 1, A -> -65
|
||||
def self.db_version(version)
|
||||
return nil if(version.nil? || version == ' ')
|
||||
version.to_i if Integer(version)
|
||||
rescue
|
||||
version = ' ' if version.blank?
|
||||
|
||||
@ -37,6 +37,10 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
STATUS_DELETED = 1
|
||||
STATUS_ACTIVE = 0
|
||||
|
||||
PATCH_VERSION = 1
|
||||
MINOR_VERSION = 2
|
||||
MAJOR_VERSION = 3
|
||||
|
||||
PROTOCOLS = {
|
||||
'application/msword' => 'ms-word',
|
||||
'application/excel' => 'ms-excel',
|
||||
@ -145,15 +149,18 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def version
|
||||
DmsfFileRevision.version major_version, minor_version
|
||||
DmsfFileRevision.version major_version, minor_version, patch_version
|
||||
end
|
||||
|
||||
def self.version(major_version, minor_version)
|
||||
def self.version(major_version, minor_version, patch_version)
|
||||
if major_version && minor_version
|
||||
ver = DmsfUploadHelper::gui_version(major_version).to_s
|
||||
if -minor_version != ' '.ord
|
||||
ver << ".#{DmsfUploadHelper::gui_version(minor_version)}"
|
||||
end
|
||||
if patch_version.present? && (-patch_version != ' '.ord)
|
||||
ver << ".#{DmsfUploadHelper::gui_version(patch_version)}"
|
||||
end
|
||||
ver
|
||||
end
|
||||
end
|
||||
@ -211,6 +218,7 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
new_revision.workflow = workflow
|
||||
new_revision.major_version = major_version
|
||||
new_revision.minor_version = minor_version
|
||||
new_revision.patch_version = patch_version
|
||||
new_revision.source_revision = self
|
||||
new_revision.user = User.current
|
||||
new_revision.name = name
|
||||
@ -259,17 +267,26 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def increase_version(version_to_increase)
|
||||
# Patch version
|
||||
self.patch_version = case version_to_increase
|
||||
when PATCH_VERSION
|
||||
DmsfUploadHelper.increase_version patch_version
|
||||
else
|
||||
nil
|
||||
end
|
||||
# Minor version
|
||||
self.minor_version = case version_to_increase
|
||||
when 1
|
||||
DmsfUploadHelper.increase_version(minor_version, 1)
|
||||
when 2
|
||||
when MINOR_VERSION
|
||||
DmsfUploadHelper.increase_version minor_version
|
||||
when MAJOR_VERSION
|
||||
(major_version < 0) ? -(' '.ord) : 0
|
||||
else
|
||||
minor_version
|
||||
end
|
||||
# Major version
|
||||
self.major_version = case version_to_increase
|
||||
when 2
|
||||
DmsfUploadHelper::increase_version(major_version, 1)
|
||||
when MAJOR_VERSION
|
||||
DmsfUploadHelper::increase_version major_version
|
||||
else
|
||||
major_version
|
||||
end
|
||||
|
||||
@ -172,7 +172,7 @@ class DmsfMailer < Mailer
|
||||
end
|
||||
# Watchers
|
||||
watchers = []
|
||||
file.get_all_watchers(watchers)
|
||||
file&.get_all_watchers(watchers)
|
||||
users.concat watchers
|
||||
if User.current&.pref.no_self_notified
|
||||
users.delete User.current
|
||||
|
||||
@ -33,9 +33,10 @@ class DmsfQuery < Query
|
||||
DmsfTitleQueryColumn.new(:title, sortable: 'title', frozen: true),
|
||||
QueryColumn.new(:size, sortable: 'size'),
|
||||
DmsfModifiedQueryColumn.new(:modified, sortable: 'updated'),
|
||||
DmsfVersionQueryColumn.new(:version, sortable: 'major_version, minor_version', caption: :label_dmsf_version),
|
||||
DmsfVersionQueryColumn.new(:version, sortable: %(major_version minor_version patch_version),
|
||||
caption: :label_dmsf_version),
|
||||
QueryColumn.new(:workflow, sortable: 'workflow'),
|
||||
QueryColumn.new(:author, sortable: 'firstname, lastname')
|
||||
QueryColumn.new(:author, sortable: %(firstname lastname))
|
||||
]
|
||||
|
||||
def initialize(attributes=nil, *args)
|
||||
@ -170,10 +171,10 @@ class DmsfQuery < Query
|
||||
order_option = ['sort', group_by_sort_order, (options[:order] || sort_clause[0])].flatten.reject(&:blank?)
|
||||
if order_option.size > 1
|
||||
DmsfFileRevisionCustomField.visible.pluck(:id, :name).each do |id, name|
|
||||
order_option[1].gsub!("cf_#{id}.value", "cf_#{id}")
|
||||
order_option[1].gsub! "cf_#{id}.value", "cf_#{id}"
|
||||
end
|
||||
if order_option[1] =~ /(firstname|major_version), (lastname|minor_version) (DESC|ASC)$/
|
||||
order_option[1].gsub!(',', " #{$3},")
|
||||
if order_option[1] =~ /^(firstname|major_version),? (lastname|minor_version)( patch_version)? (DESC|ASC)$/
|
||||
order_option[1] = $3.present? ? "#{$1} #{$4}, #{$2} #{$4}, #{$3} #{$4}" : "#{$1} #{$4}, #{$2} #{$4}"
|
||||
end
|
||||
end
|
||||
|
||||
@ -245,6 +246,7 @@ class DmsfQuery < Query
|
||||
projects.updated_on AS updated,
|
||||
CAST(NULL AS #{get_integer_type}) AS major_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS minor_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS patch_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow_id,
|
||||
'' AS firstname,
|
||||
@ -278,6 +280,7 @@ class DmsfQuery < Query
|
||||
dmsf_folders.updated_at AS updated,
|
||||
CAST(NULL AS #{get_integer_type}) AS major_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS minor_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS patch_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow_id,
|
||||
users.firstname AS firstname,
|
||||
@ -322,6 +325,7 @@ class DmsfQuery < Query
|
||||
COALESCE(dmsf_folders.updated_at, dmsf_links.updated_at) AS updated,
|
||||
CAST(NULL AS #{get_integer_type}) AS major_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS minor_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS patch_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow_id,
|
||||
users.firstname AS firstname,
|
||||
@ -361,6 +365,7 @@ class DmsfQuery < Query
|
||||
dmsf_file_revisions.updated_at AS updated,
|
||||
dmsf_file_revisions.major_version AS major_version,
|
||||
dmsf_file_revisions.minor_version AS minor_version,
|
||||
dmsf_file_revisions.patch_version AS patch_version,
|
||||
dmsf_file_revisions.workflow AS workflow,
|
||||
dmsf_file_revisions.dmsf_workflow_id AS workflow_id,
|
||||
users.firstname AS firstname,
|
||||
@ -401,6 +406,7 @@ class DmsfQuery < Query
|
||||
dmsf_file_revisions.updated_at AS updated,
|
||||
dmsf_file_revisions.major_version AS major_version,
|
||||
dmsf_file_revisions.minor_version AS minor_version,
|
||||
dmsf_file_revisions.patch_version AS patch_version,
|
||||
dmsf_file_revisions.workflow AS workflow,
|
||||
dmsf_file_revisions.dmsf_workflow_id AS workflow_id,
|
||||
users.firstname AS firstname,
|
||||
@ -443,6 +449,7 @@ class DmsfQuery < Query
|
||||
dmsf_links.updated_at AS updated,
|
||||
CAST(NULL AS #{get_integer_type}) AS major_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS minor_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS patch_version,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow,
|
||||
CAST(NULL AS #{get_integer_type}) AS workflow_id,
|
||||
users.firstname AS firstname,
|
||||
|
||||
@ -31,6 +31,7 @@ class DmsfUpload
|
||||
attr_accessor :comment
|
||||
attr_accessor :major_version
|
||||
attr_accessor :minor_version
|
||||
attr_accessor :patch_version
|
||||
attr_accessor :locked
|
||||
attr_accessor :workflow
|
||||
attr_accessor :custom_values
|
||||
@ -83,6 +84,7 @@ class DmsfUpload
|
||||
@description = uploaded[:comment]
|
||||
@major_version = 0
|
||||
@minor_version = 0
|
||||
@patch_version = nil
|
||||
@workflow = nil
|
||||
file = DmsfFile.new
|
||||
file.project_id = project.id
|
||||
@ -100,6 +102,7 @@ class DmsfUpload
|
||||
end
|
||||
@major_version = last_revision.major_version
|
||||
@minor_version = last_revision.minor_version
|
||||
@patch_version = last_revision.patch_version
|
||||
@workflow = last_revision.workflow
|
||||
@custom_values = Array.new(file.last_revision.custom_values)
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
class DmsfVersionQueryColumn < QueryColumn
|
||||
|
||||
def value_object(object)
|
||||
DmsfFileRevision.version object.major_version, object.minor_version
|
||||
DmsfFileRevision.version object.major_version, object.minor_version, object.patch_version
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
%>
|
||||
|
||||
<div class="box tabular">
|
||||
<strong><%= l(:heading_new_revision) %> <a href="#" id="new_revision_form_content_toggle">[+]</a></strong>
|
||||
<strong><%= l(:heading_new_revision) %> <a href="#" id="new_revision_form_content_toggle">[+]</a></strong>
|
||||
<div id="new_revision_form_content">
|
||||
<% if @file.locked_for_user? %>
|
||||
<p class="warning"><%= l(:info_file_locked) %></p>
|
||||
@ -31,7 +31,7 @@
|
||||
<%= labelled_form_for(@revision, url: { action: 'create_revision', id: @file },
|
||||
html: { method: :post, multipart: true, id: 'new_revision_form' }) do |f| %>
|
||||
<%= hidden_field_tag 'back_url', params[:back_url] %>
|
||||
<div class="clear">
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= f.text_field(:title) %>
|
||||
@ -46,37 +46,25 @@
|
||||
<p>
|
||||
<%= f.text_area :description, rows: 6, class: 'wiki-edit dmsf-description' %>
|
||||
</p>
|
||||
<div class="clear">
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= render partial: 'dmsf_files/version_selector', locals: {
|
||||
label_tag_name: 'version',
|
||||
select_tag_name_patch: 'version_patch',
|
||||
select_tag_name_minor: 'version_minor',
|
||||
select_tag_name_major: 'version_major',
|
||||
revision_or_upload: @file.last_revision } %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<div class="custom_fields">
|
||||
<% @revision.custom_field_values.each do |value| %>
|
||||
<% value.value = nil if value.custom_field.dmsf_not_inheritable %>
|
||||
<p><%= custom_field_tag_with_label(:dmsf_file_revision, value) %></p>
|
||||
<% value.value = nil if value.custom_field.dmsf_not_inheritable %>
|
||||
<p><%= custom_field_tag_with_label(:dmsf_file_revision, value) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag('version_0', l(:label_dmsf_version)) %>
|
||||
<%= radio_button_tag('version', 0, @revision.version == @file.last_revision.version) %>
|
||||
<%= @file.last_revision.version %>
|
||||
<%= l(:option_version_same) %><br/>
|
||||
<%= radio_button_tag('version', 1, @revision.major_version == @file.last_revision.major_version && @revision.minor_version != @file.last_revision.minor_version) %>
|
||||
<%= DmsfUploadHelper::gui_version(@file.last_revision.major_version) %>.<%= DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(@file.last_revision.minor_version, 1)) %>
|
||||
<%= l(:option_version_minor) %><br/>
|
||||
<%= radio_button_tag('version', 2, @revision.major_version != @file.last_revision.major_version) %>
|
||||
<%= DmsfUploadHelper.gui_version(DmsfUploadHelper::increase_version(@file.last_revision.major_version, 1)) %>.0
|
||||
<%= l(:option_version_major) %><br/>
|
||||
<%= radio_button_tag('version', 3) %>
|
||||
<%= select_tag 'custom_version_major', options_for_select(DmsfUploadHelper::major_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(@file.last_revision.major_version, 2))),
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf-select-version' %>.
|
||||
<%= select_tag 'custom_version_minor', options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(@file.last_revision.minor_version, 1))),
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf-select-version' %>
|
||||
<%= l(:option_version_custom) %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box" id="file_upload_box">
|
||||
<p>
|
||||
|
||||
45
app/views/dmsf_files/_version_selector.html.erb
Normal file
45
app/views/dmsf_files/_version_selector.html.erb
Normal file
@ -0,0 +1,45 @@
|
||||
<%
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright © 2011-22 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= label_tag(label_tag_name, l(:label_dmsf_version)) %>
|
||||
<%= select_tag select_tag_name_major, options_for_select(DmsfUploadHelper::major_version_select_options,
|
||||
DmsfUploadHelper::gui_version(revision_or_upload.major_version)),
|
||||
class: 'dmsf-select-version' %>
|
||||
<bold>.</bold>
|
||||
<% if revision_or_upload.patch_version.present? && (DmsfUploadHelper::gui_version(revision_or_upload.patch_version) != ' ') %>
|
||||
<%= select_tag select_tag_name_minor, options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(revision_or_upload.minor_version)),
|
||||
class: 'dmsf-select-version' %>
|
||||
<bold>.</bold>
|
||||
<%= select_tag select_tag_name_patch, options_for_select(DmsfUploadHelper::patch_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(revision_or_upload.patch_version))),
|
||||
class: 'dmsf-select-version' %>
|
||||
<% else %>
|
||||
<%= select_tag select_tag_name_minor, options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(revision_or_upload.minor_version))),
|
||||
class: 'dmsf-select-version' %>
|
||||
<bold>.</bold>
|
||||
<%= select_tag select_tag_name_patch, options_for_select(DmsfUploadHelper::patch_version_select_options,
|
||||
[h(' '), '']), class: 'dmsf-select-version' %>
|
||||
<% end %>
|
||||
@ -18,7 +18,13 @@ api.dmsf_file do
|
||||
api.title r.title
|
||||
api.description r.description
|
||||
api.workflow r.workflow
|
||||
api.version "#{r.major_version}.#{r.minor_version}"
|
||||
if r.patch_version.present?
|
||||
api.version "#{r.major_version}.#{r.minor_version}.#{r.patch_version}"
|
||||
elsif r.minor_version.present?
|
||||
api.version "#{r.major_version}.#{r.minor_version}"
|
||||
else
|
||||
api.version r.major_version
|
||||
end
|
||||
api.comment r.comment
|
||||
api.user_id r.user_id
|
||||
api.created_at r.created_at
|
||||
|
||||
@ -190,12 +190,6 @@
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
$('#file_upload_box').change(function() {
|
||||
if($("input[name='version']:checked").val() == '0') {
|
||||
$('#version_1').prop('checked', true);
|
||||
}
|
||||
$('#version_0').prop('disabled', true);
|
||||
});
|
||||
$('#new_revision_form_content_toggle').click(function() {
|
||||
if($('#new_revision_form_content').is(':visible')) {
|
||||
$(this).text('[+]');
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<%= hidden_field_tag "commited_files[#{i}][size]", upload.size %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][mime_type]", upload.mime_type %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][digest]", upload.digest %>
|
||||
<div class="clear">
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag "commited_files[#{i}][title]", l(:label_title) %>
|
||||
@ -48,39 +48,16 @@
|
||||
<%= text_area_tag "commited_files[#{i}][description]", upload.description, rows: 6,
|
||||
class: 'wiki-edit dmsf-description' %>
|
||||
</p>
|
||||
<div class="clear">
|
||||
<div class="splitcontentright">
|
||||
<div class="custom_fields">
|
||||
<% upload.custom_values.each do |value| %>
|
||||
<% value.value = nil if value.custom_field.dmsf_not_inheritable %>
|
||||
<p><%= custom_field_tag_with_label "commited_files[#{i}]", value %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag "commited_files[#{i}][version]_minor", l(:label_dmsf_version) %>
|
||||
<%= radio_button_tag "commited_files[#{i}][version]", 1, true %>
|
||||
<%= DmsfUploadHelper::gui_version(upload.major_version) %>.<%= DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(upload.minor_version, 1)) %>
|
||||
<%= l(:option_version_minor) %><br/>
|
||||
<%= radio_button_tag "commited_files[#{i}][version]", 2 %>
|
||||
<%= DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(upload.major_version, 1)) %>.0
|
||||
<%= l(:option_version_major) %><br/>
|
||||
<%= radio_button_tag "commited_files[#{i}][version]", 3 %>
|
||||
<%= select_tag "commited_files[#{i}][custom_version_major]",
|
||||
options_for_select(DmsfUploadHelper::major_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(upload.major_version, 2))),
|
||||
onchange: "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
class: 'dmsf-select-version'%>.
|
||||
<%= select_tag "commited_files[#{i}][custom_version_minor]",
|
||||
options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(upload.minor_version, 1))),
|
||||
onchange: "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
class: 'dmsf-select-version' %>
|
||||
<%= l(:option_version_custom) %>
|
||||
<%= render partial: 'dmsf_files/version_selector', locals: {
|
||||
label_tag_name: "commited_files[#{i}][version]",
|
||||
select_tag_name_patch: "commited_files[#{i}][version_patch]",
|
||||
select_tag_name_minor: "commited_files[#{i}][version_minor]",
|
||||
select_tag_name_major: "commited_files[#{i}][version_major]",
|
||||
revision_or_upload: upload } %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= label_tag '', l(:label_mime) %>
|
||||
<%= text_field_tag :name, h(upload.mime_type), readonly: true %>
|
||||
@ -90,6 +67,14 @@
|
||||
<%= text_field_tag :name, number_to_human_size(upload.size), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<div class="custom_fields">
|
||||
<% upload.custom_values.each do |value| %>
|
||||
<% value.value = nil if value.custom_field.dmsf_not_inheritable %>
|
||||
<p><%= custom_field_tag_with_label "commited_files[#{i}]", value %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<%= label_tag "commited_files[#{i}][comment]", l(:label_comment) %>
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<%= hidden_field_tag "commited_files[#{i}][name]", upload.name %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][digest]", upload.digest %>
|
||||
<p class="warning"><%= l(:info_file_locked) %></p>
|
||||
<div class="clear">
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag '', l(:label_title) %>
|
||||
@ -52,18 +52,7 @@
|
||||
</div>
|
||||
</p>
|
||||
<% end %>
|
||||
<div class="clear">
|
||||
<div class="splitcontentright">
|
||||
<div class="custom_fields">
|
||||
<% upload.custom_values.each do |value| %>
|
||||
<p>
|
||||
<%= label_tag '', h(value.custom_field.name) %>
|
||||
<% value.value = nil if value.custom_field.dmsf_not_inheritable %>
|
||||
<%= text_field_tag :name, h(value.value), readonly: true %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag '', l(:label_dmsf_version) %>
|
||||
@ -71,8 +60,6 @@
|
||||
"#{DmsfUploadHelper::gui_version(upload.major_version)}.#{DmsfUploadHelper::gui_version(upload.minor_version)}",
|
||||
readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= label_tag '', l(:label_mime) %>
|
||||
<%= text_field_tag :name, h(upload.mime_type), readonly: true %>
|
||||
@ -82,6 +69,17 @@
|
||||
<%= text_field_tag :name, h(number_to_human_size(upload.size)), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<div class="custom_fields">
|
||||
<% upload.custom_values.each do |value| %>
|
||||
<p>
|
||||
<%= label_tag '', h(value.custom_field.name) %>
|
||||
<% value.value = nil if value.custom_field.dmsf_not_inheritable %>
|
||||
<%= text_field_tag :name, h(value.value), readonly: true %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if upload.comment.present? %>
|
||||
<p>
|
||||
|
||||
@ -296,5 +296,3 @@ else {
|
||||
$(document).on("erui_new_dom", dmsfSetupFileDrop);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -121,7 +121,8 @@ cs:
|
||||
label_size: Velikost
|
||||
heading_new_revision: Nová revize
|
||||
option_version_same: Stejná
|
||||
option_version_minor: Podružná
|
||||
option_version_patch: Revize
|
||||
option_version_minor: Vedlejší
|
||||
option_version_major: Hlavní
|
||||
option_version_custom: Vlastní
|
||||
label_new_content: Nový obsah
|
||||
|
||||
@ -121,6 +121,7 @@ de:
|
||||
label_size: Größe
|
||||
heading_new_revision: Neue Version
|
||||
option_version_same: Gleiche Version
|
||||
option_version_patch: Patchversion
|
||||
option_version_minor: Unterversion
|
||||
option_version_major: Hauptversion
|
||||
label_new_content: Neuer Inhalt
|
||||
|
||||
@ -121,6 +121,7 @@ en:
|
||||
label_size: Size
|
||||
heading_new_revision: New Revision
|
||||
option_version_same: Same
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Minor
|
||||
option_version_major: Major
|
||||
option_version_custom: Custom
|
||||
|
||||
@ -121,6 +121,7 @@ es:
|
||||
label_size: Tamaño
|
||||
heading_new_revision: Nueva Revisión
|
||||
option_version_same: Misma
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Menor
|
||||
option_version_major: Mayor
|
||||
option_version_custom: Custom
|
||||
|
||||
@ -121,6 +121,7 @@ fr:
|
||||
label_size: Taille
|
||||
heading_new_revision: Nouvelle révision
|
||||
option_version_same: (identique)
|
||||
option_version_patch: Patch
|
||||
option_version_minor: (modification mineure)
|
||||
option_version_major: (modification majeure)
|
||||
option_version_custom: (personnalisée)
|
||||
|
||||
@ -121,6 +121,7 @@ hu:
|
||||
label_size: Méret
|
||||
heading_new_revision: Új változat
|
||||
option_version_same: Ugyanaz
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Kisebb
|
||||
option_version_major: Fő
|
||||
option_version_custom: Egyedi
|
||||
|
||||
@ -121,6 +121,7 @@ it: # Italian strings thx 2 Matteo Arceci!
|
||||
label_size: Dimensioni
|
||||
heading_new_revision: Nuova revisione
|
||||
option_version_same: Stessa
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Miniore
|
||||
option_version_major: Maggiore
|
||||
option_version_custom: Personalizzata
|
||||
|
||||
@ -121,6 +121,7 @@ ja:
|
||||
label_size: サイズ
|
||||
heading_new_revision: 新しいリビジョン
|
||||
option_version_same: 変更なし
|
||||
option_version_patch: Patch
|
||||
option_version_minor: マイナー
|
||||
option_version_major: メジャー
|
||||
option_version_custom: カスタム
|
||||
|
||||
@ -121,6 +121,7 @@ ko:
|
||||
label_size: 크기
|
||||
heading_new_revision: 새로운 수정
|
||||
option_version_same: 동일한
|
||||
option_version_patch: Patch
|
||||
option_version_minor: 중요하지 않은
|
||||
option_version_major: 중요한
|
||||
option_version_custom: 임의의
|
||||
|
||||
@ -121,6 +121,7 @@ nl:
|
||||
label_size: Grootte
|
||||
heading_new_revision: Nieuwe Revisie
|
||||
option_version_same: Hetzelfde
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Beperkt
|
||||
option_version_major: Belangrijk
|
||||
option_version_custom: Aangepast
|
||||
|
||||
@ -121,6 +121,7 @@ pl:
|
||||
label_size: Rozmiar
|
||||
heading_new_revision: Nowa wersja
|
||||
option_version_same: Same
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Minor
|
||||
option_version_major: Major
|
||||
option_version_custom: Custom
|
||||
|
||||
@ -121,6 +121,7 @@ pt-BR:
|
||||
label_size: Tamanho
|
||||
heading_new_revision: Nova revisão
|
||||
option_version_same: Mesma
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Minor
|
||||
option_version_major: Major
|
||||
option_version_custom: Personalizado
|
||||
|
||||
@ -121,6 +121,7 @@ ru:
|
||||
label_size: Размер
|
||||
heading_new_revision: Новая редакция
|
||||
option_version_same: Та же версия
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Незначительные изменения
|
||||
option_version_major: Значительные изменения
|
||||
option_version_custom: Пользовательская
|
||||
|
||||
@ -121,6 +121,7 @@ sl:
|
||||
label_size: Velikost
|
||||
heading_new_revision: Nova verzija
|
||||
option_version_same: Enako
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Minor
|
||||
option_version_major: Major
|
||||
option_version_custom: Custom
|
||||
|
||||
@ -121,6 +121,7 @@ zh-TW:
|
||||
label_size: 大小
|
||||
heading_new_revision: 新增修訂版本
|
||||
option_version_same: Same
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Minor
|
||||
option_version_major: Major
|
||||
option_version_custom: Custom
|
||||
|
||||
@ -121,6 +121,7 @@ zh:
|
||||
label_size: 大小
|
||||
heading_new_revision: 新修订
|
||||
option_version_same: Same
|
||||
option_version_patch: Patch
|
||||
option_version_minor: Minor
|
||||
option_version_major: Major
|
||||
option_version_custom: Custom
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright © 2011-22 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright © 2016-17 carlolars
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright © 2011-22 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright © 2016-17 carlolars
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -19,10 +18,11 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class AddOwnerToDmsfLock < ActiveRecord::Migration[5.2]
|
||||
class AddPatchVersion < ActiveRecord::Migration[5.2]
|
||||
|
||||
def change
|
||||
add_column :dmsf_locks, :owner, :string, null: true
|
||||
add_column :dmsf_file_revisions, :patch_version, :integer, null: true,
|
||||
after: :minor_version
|
||||
end
|
||||
|
||||
end
|
||||
@ -4,9 +4,13 @@
|
||||
<uploaded_file>
|
||||
<name>cat.gif</name>
|
||||
<title>cat</title>
|
||||
<!-- Optional -->
|
||||
<description>REST API</description>
|
||||
<comment>From API</comment>
|
||||
<version/>
|
||||
<version_major>A</version_major>
|
||||
<version_minor>1</version_minor>
|
||||
<version_patch>0</version_patch>
|
||||
<!-- End of optional -->
|
||||
<token>15838.c49f68ff81b552d315927df2e27df506</token>
|
||||
</uploaded_file>
|
||||
</attachments>
|
||||
|
||||
@ -47,22 +47,22 @@ module RedmineDmsf
|
||||
def lock!(scope = :scope_exclusive, type = :type_write, expire = nil, owner = nil)
|
||||
# Raise a lock error if entity is locked, but its not at resource level
|
||||
existing = lock(false)
|
||||
raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError.new(l(:error_resource_or_parent_locked)) if self.locked? && existing.empty?
|
||||
raise RedmineDmsf::Errors::DmsfLockError.new(l(:error_resource_or_parent_locked)) if self.locked? && existing.empty?
|
||||
unless existing.empty?
|
||||
if (existing[0].lock_scope == :scope_shared) && (scope == :scope_shared)
|
||||
# RFC states if an item is exclusively locked and another lock is attempted we reject
|
||||
# if the item is shared locked however, we can always add another lock to it
|
||||
if self.dmsf_folder.locked?
|
||||
raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError.new(l(:error_parent_locked))
|
||||
raise RedmineDmsf::Errors::DmsfLockError.new(l(:error_parent_locked))
|
||||
else
|
||||
existing.each do |l|
|
||||
if (l.user.id == User.current.id) && (owner.nil? || (owner.downcase == l.owner&.downcase))
|
||||
raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError.new(l(:error_resource_locked))
|
||||
raise RedmineDmsf::Errors::DmsfLockError.new(l(:error_resource_locked))
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError.new(l(:error_lock_exclusively)) if scope == :scope_exclusive
|
||||
raise RedmineDmsf::Errors::DmsfLockError.new(l(:error_lock_exclusively)) if scope == :scope_exclusive
|
||||
end
|
||||
end
|
||||
l = DmsfLock.new
|
||||
@ -113,16 +113,16 @@ module RedmineDmsf
|
||||
end
|
||||
|
||||
def unlock!(force_file_unlock_allowed = false, owner = nil)
|
||||
raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError.new(l(:warning_file_not_locked)) unless self.locked?
|
||||
raise RedmineDmsf::Errors::DmsfLockError.new(l(:warning_file_not_locked)) unless self.locked?
|
||||
existing = self.lock(true)
|
||||
destroyed = false
|
||||
# If its empty its a folder that's locked (not root)
|
||||
if existing.empty? || (!self.dmsf_folder.nil? && self.dmsf_folder.locked?)
|
||||
raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError.new(l(:error_unlock_parent_locked))
|
||||
raise RedmineDmsf::Errors::DmsfLockError.new(l(:error_unlock_parent_locked))
|
||||
else
|
||||
# If entity is locked to you, you aren't the lock originator (or named in a shared lock) so deny action
|
||||
# Unless of course you have the rights to force an unlock
|
||||
raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError.new(l(:error_only_user_that_locked_file_can_unlock_it)) if (
|
||||
raise RedmineDmsf::Errors::DmsfLockError.new(l(:error_only_user_that_locked_file_can_unlock_it)) if (
|
||||
self.locked_for_user? && !User.current.allowed_to?(:force_file_unlock, self.project) && !force_file_unlock_allowed)
|
||||
# Now we need to determine lock type and do the needful
|
||||
if (existing.count == 1) && (existing[0].lock_scope == :exclusive)
|
||||
|
||||
@ -267,7 +267,7 @@ module RedmineDmsf
|
||||
else
|
||||
# Create a new revison by cloning the last revision in the destination
|
||||
new_revision = dest.resource.file.last_revision.clone
|
||||
new_revision.increase_version 1
|
||||
new_revision.increase_version DmsfFileRevision::PATCH_VERSION
|
||||
end
|
||||
# The file on disk must be renamed from .tmp to the correct filetype or else Xapian won't know how to index.
|
||||
# Copy file.last_revision.disk_file to new_revision.disk_file
|
||||
@ -569,7 +569,7 @@ module RedmineDmsf
|
||||
new_revision.dmsf_file = f
|
||||
new_revision.user = User.current
|
||||
new_revision.name = basename
|
||||
new_revision.increase_version(1) unless reuse_revision
|
||||
new_revision.increase_version(DmsfFileRevision::PATCH_VERSION) unless reuse_revision
|
||||
new_revision.mime_type = Redmine::MimeType.of(new_revision.name)
|
||||
|
||||
# Phusion passenger does not have a method "length" in its model
|
||||
|
||||
@ -129,9 +129,13 @@ class DmsfFileApiTest < RedmineDmsf::Test::IntegrationTest
|
||||
<uploaded_file>
|
||||
<name>test.txt</name>
|
||||
<title>test.txt</title>
|
||||
<!-- Optional -->
|
||||
<description>REST API</description>
|
||||
<comment>From API</comment>
|
||||
<version/>
|
||||
<version_major>A</version_major>
|
||||
<version_minor>1</version_minor>
|
||||
<version_patch>0</version_patch>
|
||||
<!-- End of optional -->
|
||||
<token>#{ftoken}</token>
|
||||
</uploaded_file>
|
||||
</attachments>}
|
||||
|
||||
@ -129,40 +129,47 @@ class DmsfFileRevisionTest < RedmineDmsf::Test::UnitTest
|
||||
end
|
||||
|
||||
def test_increase_version
|
||||
# 1.0.0 -> 1.0.1
|
||||
@revision1.major_version = 1
|
||||
@revision1.minor_version = 0
|
||||
@revision1.increase_version DmsfFileRevision::PATCH_VERSION
|
||||
assert_equal 1, @revision1.major_version
|
||||
assert_equal 0, @revision1.minor_version
|
||||
assert_equal 1, @revision1.patch_version
|
||||
# 1.0 -> 1.1
|
||||
@revision1.major_version = 1
|
||||
@revision1.minor_version = 0
|
||||
@revision1.increase_version(1)
|
||||
@revision1.increase_version DmsfFileRevision::MINOR_VERSION
|
||||
assert_equal 1, @revision1.major_version
|
||||
assert_equal 1, @revision1.minor_version
|
||||
# 1.0 -> 2.0
|
||||
@revision1.major_version = 1
|
||||
@revision1.minor_version = 0
|
||||
@revision1.increase_version(2)
|
||||
@revision1.increase_version DmsfFileRevision::MAJOR_VERSION
|
||||
assert_equal 2, @revision1.major_version
|
||||
assert_equal 0, @revision1.minor_version
|
||||
# 1.1 -> 2.0
|
||||
@revision1.major_version = 1
|
||||
@revision1.minor_version = 1
|
||||
@revision1.increase_version(2)
|
||||
@revision1.increase_version DmsfFileRevision::MAJOR_VERSION
|
||||
assert_equal 2, @revision1.major_version
|
||||
assert_equal 0, @revision1.minor_version
|
||||
# A -> A.1
|
||||
@revision1.major_version = -('A'.ord)
|
||||
@revision1.minor_version = -(' '.ord)
|
||||
@revision1.increase_version(1)
|
||||
@revision1.increase_version DmsfFileRevision::MINOR_VERSION
|
||||
assert_equal -('A'.ord), @revision1.major_version
|
||||
assert_equal 1, @revision1.minor_version
|
||||
# A -> B
|
||||
@revision1.major_version = -('A'.ord)
|
||||
@revision1.minor_version = -(' '.ord)
|
||||
@revision1.increase_version(2)
|
||||
@revision1.increase_version DmsfFileRevision::MAJOR_VERSION
|
||||
assert_equal -('B'.ord), @revision1.major_version
|
||||
assert_equal -(' '.ord), @revision1.minor_version
|
||||
# A.1 -> B
|
||||
@revision1.major_version = -('A'.ord)
|
||||
@revision1.minor_version = 1
|
||||
@revision1.increase_version(2)
|
||||
@revision1.increase_version DmsfFileRevision::MAJOR_VERSION
|
||||
assert_equal -('B'.ord), @revision1.major_version
|
||||
assert_equal -(' '.ord), @revision1.minor_version
|
||||
end
|
||||
|
||||
@ -69,13 +69,13 @@ class DmsfLockTest < RedmineDmsf::Test::UnitTest
|
||||
@folder7.lock!
|
||||
User.current = nil
|
||||
assert_no_difference('@folder7.lock.count') do
|
||||
assert_raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError do
|
||||
assert_raise RedmineDmsf::Errors::DmsfLockError do
|
||||
@folder7.unlock!
|
||||
end
|
||||
end
|
||||
User.current = @jsmith
|
||||
assert_no_difference('@folder7.lock.count') do
|
||||
assert_raise RedmineDmsf::Errors::RedmineDmsf::Errors::DmsfLockError do
|
||||
assert_raise RedmineDmsf::Errors::DmsfLockError do
|
||||
@folder7.unlock!
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user