Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix admin information checklist for IFC transformation tools

Wieland Lindenthal69da54d5fe69
diff --git a/modules/ifc_models/app/services/ifc_models/view_converter_service.rb b/modules/ifc_models/app/services/ifc_models/view_converter_service.rb
index 0e2b2148e34..5d1f8296a26 100644
--- a/modules/ifc_models/app/services/ifc_models/view_converter_service.rb
+++ b/modules/ifc_models/app/services/ifc_models/view_converter_service.rb
@@ -41,12 +41,12 @@ module IFCModels
##
# Check availability of the pipeline
- def available?
+ def self.available?
available_commands.length == PIPELINE_COMMANDS.length
end
- def available_commands
- @available ||= begin
+ def self.available_commands
+ @@available ||= begin
PIPELINE_COMMANDS.select do |command|
_, status = Open3.capture2e('which', command)
status.exitstatus == 0
@@ -153,8 +153,8 @@ module IFCModels
end
def validate!
- unless available?
- missing = PIPELINE_COMMANDS - available_commands
+ unless self.class.available?
+ missing = PIPELINE_COMMANDS - self.class.available_commands
raise I18n.t('ifc_models.conversion.missing_commands', names: missing.join(", "))
end
diff --git a/modules/ifc_models/lib/open_project/ifc_models/hooks.rb b/modules/ifc_models/lib/open_project/ifc_models/hooks.rb
index 22c34a7a8dd..5bc89a2118a 100644
--- a/modules/ifc_models/lib/open_project/ifc_models/hooks.rb
+++ b/modules/ifc_models/lib/open_project/ifc_models/hooks.rb
@@ -34,7 +34,7 @@ module OpenProject::IFCModels::Hooks
def admin_information_checklist(*)
[
- [:'extraction.available.ifc_convert', ::OpenProject::IFCModels::Converter.available?]
+ [:'extraction.available.ifc_convert', ::IFCModels::ViewConverterService.available?]
]
end
end