Project

General

Profile

Use issue's custom fields in projects_controller.rb

Added by Kush Suryavanshi about 8 years ago

In projects_controller.rb, one can get open issues through -

@open_issues_by_tracker = Issue.visible.open.where(cond).group(:tracker).count

I thought this query will return the custom fields of issues as well. So, I did an inspect -

@openIssueCondition = Issue.visible.open.where(cond)
logger.info("Condition is #{@openIssueCondition1.inspect}")

But, I don't get any custom fields back.
1) Is there any way way to get those values? I need to use them in project overview.
2) QueriesController\IssueQuery can use the custom fields - do I need to use it instead? If so, any idea how?
Thanks
Kush


Replies (1)

RE: Use issue's custom fields in projects_controller.rb - Added by Kush Suryavanshi about 8 years ago

I was able to achieve this using IssueQuery.

    (1-1/1)