upgradeya / redmine-contracts-with-time-tracking-plugin

A Redmine plugin that allows you to manage contracts and associate time-entries with those contracts.
35 stars 22 forks source link

Fix error when adding a time entry and not assigning it to a contract. #61

Open FireMartZ opened 7 years ago

FireMartZ commented 7 years ago

Issue #58

dimvic commented 6 years ago

You need to also apply the same change for the create_next_contract private method, I faced the same problem when using this plugin together with Redmine Work Time plugin

  # Create new contract if it is an hourly contract, and the settings configuration
  # is enabled and the hours exceed the current contract.
  private
  def create_next_contract
    return if contract and contract.is_fixed_price
    previous_hours = (hours_was != nil) ? hours_was : 0