From 602775382f1f9cc693fb69d2d7272b0897587521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Thu, 10 Jul 2025 16:03:06 +0200 Subject: [PATCH 1/4] 4.2.2 devel started --- .github/workflows/rubyonrails.yml | 4 ++-- CHANGELOG.md | 3 +++ README.md | 2 +- init.rb | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index b7fc0fa6..c701e6b0 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -20,9 +20,9 @@ name: "GitHub CI" on: push: - branches: ["master"] + branches: ["devel"] pull_request: - branches: ["master"] + branches: ["devel"] jobs: plugin_tests: strategy: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e258735..f8ad120d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Changelog for Redmine DMSF ========================== +4.2.2 *????-??-??* +------------------ + 4.2.1 *2025-07-10* ------------------ diff --git a/README.md b/README.md index a89876e4..dea3d6c8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Redmine DMSF Plugin 4.2.1 -[![GitHub CI](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=master)](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml) +[![GitHub CI](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=devel)](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml) [![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine) Redmine DMSF is Document Management System Features plugin for Redmine issue tracking system; It is aimed to replace current Redmine's Documents module. diff --git a/init.rb b/init.rb index d800df49..d45b92e5 100644 --- a/init.rb +++ b/init.rb @@ -27,7 +27,7 @@ Redmine::Plugin.register :redmine_dmsf do author_url 'https://github.com/picman/redmine_dmsf/graphs/contributors' author 'Vít Jonáš / Daniel Munn / Karel Pičman' description 'Document Management System Features' - version '4.2.1' + version '4.2.2 devel' requires_redmine version_or_higher: '6.0.0' From 6df0f3740a305c8447c4bebb21e11f834ed34883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Wed, 16 Jul 2025 16:05:39 +0200 Subject: [PATCH 2/4] Missing lock icon by locked objects #5 --- app/helpers/dmsf_queries_helper.rb | 16 ++++++++-------- test/functional/dmsf_controller_test.rb | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/helpers/dmsf_queries_helper.rb b/app/helpers/dmsf_queries_helper.rb index 5332f3da..c5066758 100644 --- a/app/helpers/dmsf_queries_helper.rb +++ b/app/helpers/dmsf_queries_helper.rb @@ -30,7 +30,7 @@ module DmsfQueriesHelper case item.type when 'file' file = DmsfFile.find_by(id: item.id) - if !item.deleted && file&.locked? + if !item.deleted? && file&.locked? return content_tag(:span, val) + link_to(sprite_icon('unlock', nil, icon_only: true, size: '12'), unlock_dmsf_files_path(id: file, @@ -40,7 +40,7 @@ module DmsfQueriesHelper end when 'folder' folder = DmsfFolder.find_by(id: item.id) - if !item.deleted && folder&.locked? + if !item.deleted? && folder&.locked? return content_tag(:span, val) + link_to(sprite_icon('unlock', nil, icon_only: true, size: '12'), unlock_dmsf_path(id: folder.project, @@ -54,37 +54,37 @@ module DmsfQueriesHelper when :id case item.type when 'file' - if item&.deleted&.positive? + if item.deleted? h(value) else link_to h(value), dmsf_file_path(id: item.id) end when 'file-link' - if item&.deleted&.positive? + if item.deleted? h(item.revision_id) else link_to h(item.revision_id), dmsf_file_path(id: item.revision_id) end when 'folder' if item.id - if item&.deleted&.positive? + if item.deleted? h(value) else link_to h(value), edit_dmsf_path(id: item.project_id, folder_id: item.id) end - elsif item&.deleted&.positive? + elsif item.deleted? h(item.project_id) else link_to h(item.project_id), edit_root_dmsf_path(id: item.project_id) end when 'folder-link' if item.id - if item&.deleted&.positive? + if item.deleted? h(item.revision_id) else link_to h(item.revision_id), edit_dmsf_path(id: item.project_id, folder_id: item.revision_id) end - elsif item&.deleted&.positive? + elsif item.deleted? h(item.project_id) else link_to h(item.project_id), edit_root_dmsf_path(id: item.project_id) diff --git a/test/functional/dmsf_controller_test.rb b/test/functional/dmsf_controller_test.rb index 00ed5287..f215d93a 100644 --- a/test/functional/dmsf_controller_test.rb +++ b/test/functional/dmsf_controller_test.rb @@ -290,6 +290,14 @@ class DmsfControllerTest < RedmineDmsf::Test::TestCase assert @response.media_type.include?('text/csv') end + def test_show_locked + post '/login', params: { username: 'jsmith', password: 'jsmith' } + get "/projects/#{@project2.id}/dmsf" + assert_response :success + # An unlock icon next to a locked file + assert_select 'a.icon-unlock', count: 1 + end + def test_show_folder_doesnt_correspond_the_project post '/login', params: { username: 'jsmith', password: 'jsmith' } assert @project1 != @folder3.project From 62f340a398ff9ce3dddbca2eb784386216f9298a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Thu, 17 Jul 2025 16:00:54 +0200 Subject: [PATCH 3/4] '#' => 'ID' --- app/models/dmsf_query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_query.rb b/app/models/dmsf_query.rb index 972e2142..dea55d78 100644 --- a/app/models/dmsf_query.rb +++ b/app/models/dmsf_query.rb @@ -26,7 +26,7 @@ class DmsfQuery < Query # Standard columns self.available_columns = [ - QueryColumn.new(:id, sortable: 'id', caption: +'#'), + QueryColumn.new(:id, sortable: 'id', caption: :label_column_id), DmsfQueryTitleColumn.new(:title, sortable: 'title', frozen: true, caption: :label_column_title), QueryColumn.new(:size, sortable: 'size', caption: :label_column_size), DmsfQueryModifiedColumn.new(:modified, sortable: 'updated', caption: :label_column_modified), From f1bae1a8445f2b3829a00f2eb7343c129c9c88dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 22 Jul 2025 09:13:15 +0200 Subject: [PATCH 4/4] v4.2.2 released --- .github/workflows/rubyonrails.yml | 4 ++-- CHANGELOG.md | 6 +++++- README.md | 4 ++-- init.rb | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index c701e6b0..b7fc0fa6 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -20,9 +20,9 @@ name: "GitHub CI" on: push: - branches: ["devel"] + branches: ["master"] pull_request: - branches: ["devel"] + branches: ["master"] jobs: plugin_tests: strategy: diff --git a/CHANGELOG.md b/CHANGELOG.md index f8ad120d..2207df23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ Changelog for Redmine DMSF ========================== -4.2.2 *????-??-??* +4.2.2 *2025-07-23* ------------------ + Missing lock icons + +* Bug: #3 - Missing lock icons by locked objects + 4.2.1 *2025-07-10* ------------------ diff --git a/README.md b/README.md index dea3d6c8..3106811d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Redmine DMSF Plugin 4.2.1 +# Redmine DMSF Plugin 4.2.2 -[![GitHub CI](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=devel)](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml) +[![GitHub CI](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=master)](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml) [![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine) Redmine DMSF is Document Management System Features plugin for Redmine issue tracking system; It is aimed to replace current Redmine's Documents module. diff --git a/init.rb b/init.rb index d45b92e5..2d12e050 100644 --- a/init.rb +++ b/init.rb @@ -27,7 +27,7 @@ Redmine::Plugin.register :redmine_dmsf do author_url 'https://github.com/picman/redmine_dmsf/graphs/contributors' author 'Vít Jonáš / Daniel Munn / Karel Pičman' description 'Document Management System Features' - version '4.2.2 devel' + version '4.2.2' requires_redmine version_or_higher: '6.0.0'