Redmine & MSSQL
Added by ChunChang (Nagaharu) Lo almost 12 years ago
Hello,
I managed to run Redmine in MSSQL 2008 R2.
Everything looks great except that the date strings saved in journal_details couldn't be convert to date again.
The saved date string looks like '10-19-2012'.
The error message is:
ActionView::Template::Error (invalid date): 8: 9: <% if journal.details.any? %> 10: <ul class="details"> 11: <% details_to_strings(journal.details).each do |string| %> 12: <li><%= string %></li> 13: <% end %> 14: </ul> app/helpers/issues_helper.rb:262:in `show_detail' app/helpers/issues_helper.rb:238:in `block in details_to_strings' app/helpers/issues_helper.rb:223:in `details_to_strings' app/views/issues/_history.html.erb:11:in `block in _app_views_issues__history_html_erb__896685244_34368216' app/views/issues/_history.html.erb:2:in `each' app/views/issues/_history.html.erb:2:in `_app_views_issues__history_html_erb__896685244_34368216' app/views/issues/show.html.erb:122:in `_app_views_issues_show_html_erb___707813030_25754412' app/controllers/issues_controller.rb:118:in `block (2 levels) in show' app/controllers/issues_controller.rb:115:in `show'
If I changed the saved date string to '2012-10-19', the issue can be displayed normally again.
Any hint for this error?
BR/shortie
Replies (4)
RE: Redmine & MSSQL
-
Added by Tommy Stålnacke over 11 years ago
Did you ever resolve this problem? I'm having the exact same issue!
/ Tommy
RE: Redmine & MSSQL
-
Added by Jan Niggemann (redmine.org team member) over 11 years ago
Rather strange, considering the column value is of type 'text', at least in MySQL.
What's the type of your column value and old_value?
RE: Redmine & MSSQL
-
Added by Martin Valensky over 11 years ago
The workaround or this problem is here #2248
I have the same problem. I have discovered that in table journal_details the column value or old_value is in format like mm-dd-yyyy and converting to date fails. The workaround is mentioned in link. I have modified the convert method to return the parameter. This is let's say cosmetic bug and I acn live with that because I use Redmine for private projects. It should be solved in future versions.
RE: Redmine & MSSQL
-
Added by Tommy Stålnacke over 11 years ago
Hi, could you please post your convert method?
Thanks
Tommy
[Edit] Found the fix here: http://www.redmine.org/issues/12694