json.(issue, :id, :subject, :project_issues_index, :project_id)
json.project do 
  if issue.project.present?
    json.partial! "api/v1/projects/simple_detail", locals: {project: issue.project}
  else
    json.nil! 
  end
end
json.blockchain_token_num (Site.has_blockchain? && issue.project&.use_blockchain) ? issue.blockchain_token_num : nil
json.created_at issue.created_on.strftime("%Y-%m-%d %H:%M")
json.updated_at issue.updated_on.strftime("%Y-%m-%d %H:%M")
json.tags issue.show_issue_tags.each do |tag|
  json.partial! "api/v1/issues/issue_tags/simple_detail", locals: {tag: tag}
end
json.status_name issue.issue_status&.name 
json.status_id issue.status_id 
json.status do 
  if issue.issue_status.present?
    json.partial! "api/v1/issues/statues/simple_detail", locals: {status: issue.issue_status}
  else
    json.nil! 
  end
end
json.priority_name issue.priority&.name 
json.priority_id issue.priority_id
json.priority do 
  if issue.priority.present?
    json.partial! "api/v1/issues/issue_priorities/simple_detail", locals: {priority: issue.priority}
  else
    json.nil! 
  end
end
json.milestone_name issue.version&.name
json.milestone_id issue.fixed_version_id
json.root_id issue.root_id
json.pm_issue_type issue.pm_issue_type
json.pm_sprint_id issue.pm_sprint_id
json.pm_project_id issue.pm_project_id
json.time_scale issue.time_scale
if params[:pm_issue_types].present? 
  json.child_count issue.children_issues.where(pm_issue_type: 4).count
else 
  json.child_count issue.child_count
end
json.author do
  json.partial! "api/v1/users/simple_user", locals: {user: issue.user}
end
json.assigners issue.show_assigners.each do |assigner| 
  json.partial! "api/v1/users/simple_user", locals: {user: assigner}
end
json.comment_journals_count issue.comment_journals.size
json.start_date issue.start_date
json.due_date issue.due_date