module OnlyofficeBugzillaHelper::BugData
Method to work with bug data
Public Instance Methods
bug_data(bug_id)
click to toggle source
Get bug data of bug @param bug_id [String, Integer] id of bug @return [JSON] data
# File lib/onlyoffice_bugzilla_helper/bug_data.rb, line 9 def bug_data(bug_id) res = get_bug_result(bug_id) JSON.parse(res.body)['bugs'].first end
bug_exists?(bug_id)
click to toggle source
@param bug_id [Integer] is bug exists @return [Boolean]
# File lib/onlyoffice_bugzilla_helper/bug_data.rb, line 24 def bug_exists?(bug_id) bug_status(bug_id) true rescue JSON::ParserError, NoMethodError false end
bug_status(bug_id)
click to toggle source
Get status of bug @param bug_id [String, Integer] id of bug @return [String] status of bug
# File lib/onlyoffice_bugzilla_helper/bug_data.rb, line 17 def bug_status(bug_id) parsed_json = bug_data(bug_id) parsed_json['status'] end