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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Allow interacting with progress modal on new work package form
Aaron Contrerase3250c481a50
diff --git a/app/controllers/work_packages/progress_controller.rb b/app/controllers/work_packages/progress_controller.rbindex 0ff702027b3..5d982683a3e 100644--- a/app/controllers/work_packages/progress_controller.rb+++ b/app/controllers/work_packages/progress_controller.rb@@ -43,7 +43,7 @@ class WorkPackages::ProgressController < ApplicationController.new(user: current_user,model: @work_package,contract_class: WorkPackages::CreateContract)- .call(work_package_params)+ .call(create_work_package_params)if service_call.errors.map(&:attribute)@@ -67,7 +67,7 @@ class WorkPackages::ProgressController < ApplicationControllerservice_call = WorkPackages::UpdateService.new(user: current_user,model: @work_package)- .call(work_package_params)+ .call(update_work_package_params)if service_call.success?respond_to do |format|@@ -99,15 +99,20 @@ class WorkPackages::ProgressController < ApplicationControllerdef set_work_package@work_package = WorkPackage.find(params[:work_package_id])rescue ActiveRecord::RecordNotFound- @work_package = WorkPackage.new(work_package_params)+ @work_package = WorkPackage.new(create_work_package_params)end- def work_package_params+ def create_work_package_paramsparams.require(:work_package).permit(%i[estimated_hours remaining_hours]).compact_blankend+ def update_work_package_params+ params.require(:work_package)+ .permit(%i[estimated_hours remaining_hours])+ end+def formatted_duration(hours)API::V3::Utilities::DateTimeFormatter.format_duration_from_hours(hours)end