lib/redmine_rest/models/issue.rb in redmine_rest-0.6.0 vs lib/redmine_rest/models/issue.rb in redmine_rest-0.6.1

- old
+ new

@@ -26,9 +26,13 @@ has_many :watchers, class_name: User has_many :relations, class_name: Relation validates :subject, :tracker_id, presence: true + def tracker_id + attributes[:tracker_id] || tracker? && tracker.id + end + # # Adds journals, relations, children and watchers to request. # # Be careful, even if issue has watchers, it won't be loaded, # because REST API can load them only after v2.3.0 (see Redmine docs)