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
increase limit to 1000 characters for comment
Klaus Zanders6088309bfefb
diff --git a/modules/costs/app/components/time_entries/comments_form.rb b/modules/costs/app/components/time_entries/comments_form.rbindex 0b8d68e3b47..a6cd7abff20 100644--- a/modules/costs/app/components/time_entries/comments_form.rb+++ b/modules/costs/app/components/time_entries/comments_form.rb@@ -31,7 +31,7 @@module TimeEntriesclass CommentsForm < ApplicationFormform do |f|- f.text_area name: :comments, label: TimeEntry.human_attribute_name(:comments), maxlength: 255+ f.text_area name: :comments, label: TimeEntry.human_attribute_name(:comments), maxlength: 1_000endendenddiff --git a/modules/costs/app/models/time_entry.rb b/modules/costs/app/models/time_entry.rbindex 0001ef25d32..a665bd6c1f4 100644--- a/modules/costs/app/models/time_entry.rb+++ b/modules/costs/app/models/time_entry.rb@@ -60,7 +60,7 @@ class TimeEntry < ApplicationRecordallow_nil: truevalidates :comments,- length: { maximum: 255 },+ length: { maximum: 1_000 },allow_blank: truevalidates :start_time,diff --git a/modules/costs/spec/models/time_entry_spec.rb b/modules/costs/spec/models/time_entry_spec.rbindex 650261693da..8ef9fad7413 100644--- a/modules/costs/spec/models/time_entry_spec.rb+++ b/modules/costs/spec/models/time_entry_spec.rb@@ -491,13 +491,13 @@ RSpec.describe TimeEntry doexpect(time_entry).to be_validend- it "allows values with a length of 255 characters" do- time_entry.comments = "a" * 255+ it "allows values with a length of 1000 characters" do+ time_entry.comments = "a" * 1000expect(time_entry).to be_validend- it "does not allow values with a length of >255 characters" do- time_entry.comments = "a" * 256+ it "does not allow values with a length of >1000 characters" do+ time_entry.comments = "a" * 1001expect(time_entry).not_to be_validendend