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
Fix create project spec
Oliver Günther8bc7915200b4
diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erbindex 34806b7e975..494767196ad 100644--- a/app/assets/javascripts/application.js.erb+++ b/app/assets/javascripts/application.js.erb@@ -165,8 +165,7 @@ function observeProjectName() {function observeProjectIdentifier() {jQuery('#project_identifier').keyup(function() {- if(jQuery('#project_identifier').getValue() !== '' &&- jQuery('#project_identifier').getValue() != generateProjectIdentifier()) {+ if(this.value !== '' && this.value != generateProjectIdentifier()) {projectIdentifierLocked = true;} else {projectIdentifierLocked = false;diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rbindex b54d7cd7141..2519f86f05e 100644--- a/app/controllers/projects_controller.rb+++ b/app/controllers/projects_controller.rb@@ -81,7 +81,7 @@ class ProjectsController < ApplicationControllerdef createcall_result =- if params[:from_template]+ if params[:from_template].present?create_from_templateelsecreate_from_params@@ -89,6 +89,7 @@ class ProjectsController < ApplicationController# In success case, nothing to docall_result.on_failure do+ @project = call_result.result@errors = call_result.errorsassign_default_create_variablesdiff --git a/spec/features/projects/project_status_administration_spec.rb b/spec/features/projects/project_status_administration_spec.rbindex e27be61170c..c7c2e727666 100644--- a/spec/features/projects/project_status_administration_spec.rb+++ b/spec/features/projects/project_status_administration_spec.rb@@ -45,8 +45,8 @@ describe 'Projects status administration', type: :feature, js: true do.and_return(r.id.to_s)endend- let(:create_status_description) { Components::WysiwygEditor.new('.form--field:nth-of-type(5)') }- let(:edit_status_description) { Components::WysiwygEditor.new('.form--field:nth-of-type(6)') }+ let(:create_status_description) { Components::WysiwygEditor.new('.form--field:nth-of-type(6)') }+ let(:edit_status_description) { Components::WysiwygEditor.new('.form--field:nth-of-type(7)') }before dologin_as current_userdiff --git a/spec/features/projects/projects_spec.rb b/spec/features/projects/projects_spec.rbindex adf9292cd24..169b2dd8ef2 100644--- a/spec/features/projects/projects_spec.rb+++ b/spec/features/projects/projects_spec.rb@@ -48,6 +48,8 @@ describe 'Projects', type: :feature dofill_in 'project[name]', with: 'Foo bar'click_on 'Advanced settings'fill_in 'project[identifier]', with: 'foo'+ sleep 1+click_on 'Create'expect(page).to have_content 'Successful creation.'@@ -63,6 +65,7 @@ describe 'Projects', type: :feature dofill_in 'project[name]', with: 'Foo bar'click_on 'Advanced settings'fill_in 'project[identifier]', with: 'foo'+ sleep 1click_on 'Create'expect(page).to have_content 'Successful creation.'