Hi, @wesoccer2003 , @upgradeya, @FireMartZ, please help to check it. Thanks.
another bug, when I log time entries in projects without any contracts, it would be 500 error.
Started POST "/time_entries" for 192.168.60.238 at 2017-03-21 10:22:42 +0800
Processing by TimelogController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"p5b8AU5rpPCVYBS8r0cUzD1ZYyRtHClxRlnpLXswSik5VONAy42dGi6TYwB0DoM6RkKVsdxM6OK2oHokpF/Ykg==", "back_url"=>"http://192.168.1.41/issues/15", "issue_id"=>"15", "time_entry"=>{"issue_id"=>"15", "spent_on"=>"2017-03-21", "hours"=>"1", "comments"=>"test", "activity_id"=>"17"}, "commit"=>"create"}
Current user: hui.wang (id=8)
Completed 500 Internal Server Error in 25ms (ActiveRecord: 6.1ms)
error log
NoMethodError (undefined method `is_fixed_price' for nil:NilClass):
plugins/contracts/lib/contracts/patches/time_entry_patch.rb:29:in `time_not_exceed_contract'
app/controllers/timelog_controller.rb:113:in `create'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'