I've been playing with Jira API via the `ruby-jira` gem. I have a task where I would like to list all the epics that belong to a user's account. My current solution is to get all the issues and return items with `issuetype` name set to `Epic`.
def list_epics
epics = []
begin
all_issues = @Integration Team_client.Issue.all
all_issues.each do |issue|
epics << issue if issue.fields.issuetype.name == 'Epic
end
rescue JIRA::HTTPError
puts "Jira API error"
end
epics
end
`@jira_client` represents an authenticated user account.
I couldn't find much information from the documentation page of `jira-ruby` project. So any help is appreciated.
Hello @Chinmaya Patanaik
Since your requirement is " I have a task where I would like to list all the epics that belong to a user's account."
Thus, in the ruby gem you can check if there is support for doing a JQL query (there must be)
The you can fire a JQL query like "type = epic and assignee = <user-account>" and thus the results from the call based on the above JQL should get you the results you want.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.