Merge branch 'pre_trustie_server' into trustie_server
This commit is contained in:
commit
90d78e04a2
|
@ -25,10 +25,12 @@ class ForkUser < ApplicationRecord
|
|||
|
||||
def incre_project_common
|
||||
CacheAsyncSetJob.perform_later("project_common_service", {forks: 1}, self.project_id)
|
||||
self.project.update_column(:updated_on, Time.now)
|
||||
end
|
||||
|
||||
def decre_project_common
|
||||
CacheAsyncSetJob.perform_later("project_common_service", {forks: -1}, self.project_id)
|
||||
self.project.update_column(:updated_on, Time.now)
|
||||
end
|
||||
|
||||
def incre_user_statistic
|
||||
|
|
|
@ -26,10 +26,12 @@ class PraiseTread < ApplicationRecord
|
|||
|
||||
def incre_project_common
|
||||
CacheAsyncSetJob.perform_later("project_common_service", {praises: 1}, self.praise_tread_object_id) if self.praise_tread_object_type == "Project"
|
||||
self.praise_tread_object.update_column(:updated_on, Time.now) if self.praise_tread_object_type == "Project"
|
||||
end
|
||||
|
||||
def decre_project_common
|
||||
CacheAsyncSetJob.perform_later("project_common_service", {praises: -1}, self.praise_tread_object_id) if self.praise_tread_object_type == "Project"
|
||||
self.praise_tread_object.update_column(:updated_on, Time.now) if self.praise_tread_object_type == "Project"
|
||||
end
|
||||
|
||||
def incre_user_statistic
|
||||
|
|
|
@ -28,10 +28,12 @@ class Watcher < ApplicationRecord
|
|||
|
||||
def incre_project_common
|
||||
CacheAsyncSetJob.perform_later("project_common_service", {watchers: 1}, self.watchable_id) if self.watchable_type == "Project"
|
||||
self.watchable.update_column(:updated_on, Time.now) if self.watchable_type == "Project"
|
||||
end
|
||||
|
||||
def decre_project_common
|
||||
CacheAsyncSetJob.perform_later("project_common_service", {watchers: -1}, self.watchable_id) if self.watchable_type == "Project"
|
||||
self.watchable.update_column(:updated_on, Time.now) if self.watchable_type == "Project"
|
||||
end
|
||||
|
||||
def incre_user_statistic
|
||||
|
|
|
@ -69,7 +69,7 @@ class Api::V1::Issues::ListService < ApplicationService
|
|||
issues = issues.joins(:assigners).where(users: {id: assigner_id}) if assigner_id.present?
|
||||
|
||||
# status_id
|
||||
issues = issues.where(status_id: status_id) if status_id.present?
|
||||
issues = issues.where(status_id: status_id) if status_id.present? && category != 'closed'
|
||||
|
||||
if begin_date&.present? || end_date&.present?
|
||||
issues = issues.where("issues.created_on between ? and ?", begin_date&.present? ? begin_date.to_time : Time.now.beginning_of_day, end_date&.present? ? end_date.to_time.end_of_day : Time.now.end_of_day)
|
||||
|
|
|
@ -8,6 +8,7 @@ end
|
|||
json.status_name issue.issue_status&.name
|
||||
json.priority_name issue.priority&.name
|
||||
json.milestone_name issue.version&.name
|
||||
json.milestone_id issue.fixed_version_id
|
||||
json.author do
|
||||
if issue.user.present?
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.user}
|
||||
|
|
Loading…
Reference in New Issue