Defect #6575

start date being filled with current date even when blank value is submitted

Added by Bruno Medeiros about 7 years ago. Updated over 4 years ago.

Status:ClosedStart date:2010-10-05
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:1.0.4
Resolution:Fixed Affected version:1.0.2

Description

I'm using redmine 1.0.2 and experiencing a very annoying defect: every time I create a new issue, the start date is filled with the current date even if i leave this field blank.

I know #2269 is not implemented yet, but redmine should respect the blank value when I erase the default suggested value.

Associated revisions

Revision 4378
Added by Jean-Philippe Lang about 7 years ago

Fixed: start date being filled with current date even when blank value is submitted (#6575).

History

#1 Updated by Bruno Medeiros about 7 years ago

Oh, this bug happens even here, I deleted the date when created this issue and it's filled now. :P

#2 Updated by Mischa The Evil about 7 years ago

I can confirm this issue on trunk at r4215. It seems introduced during the IssuesController-refactoring in r3688 followed by r3689.

I was able to fix the issue by applying the following patch:

Index: app/controllers/issues_controller.rb
===================================================================
--- app/controllers/issues_controller.rb    (revision 4215)
+++ app/controllers/issues_controller.rb    (working copy)
@@ -308,7 +308,9 @@
       end
     end
     @issue.author = User.current
-    @issue.start_date ||= Date.today
+    if (request.get? || request.xhr?)
+      @issue.start_date ||= Date.today
+    end
     @priorities = IssuePriority.all
     @allowed_statuses = @issue.new_statuses_allowed_to(User.current, true)
   end

#3 Updated by Bruno Medeiros about 7 years ago

Thanks for the patch, but I decided to apply the #2277 instead. I fixes the problem and makes what my company want.

#4 Updated by Jean-Philippe Lang about 7 years ago

  • Status changed from New to Resolved
  • Target version set to 1.0.4
  • Resolution set to Fixed

Fixed in r4378.

#5 Updated by Jean-Philippe Lang about 7 years ago

  • Status changed from Resolved to Closed

Merged in 1.0-stable in r4398.

#6 Updated by Raghu GS over 4 years ago

I am facing this issue in Redmine 2.3x versiom.

#7 Updated by Bruno Medeiros over 4 years ago

Are you sure?

Also available in: Atom PDF