fetch_metadata.rb 535 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Service::Ticket::ExternalReferences::IssueTracker::FetchMetadata < Service::Ticket::ExternalReferences::IssueTracker::Base
  3. attr_reader :issue_links
  4. def initialize(type:, issue_links:)
  5. super(type:)
  6. @issue_links = issue_links
  7. end
  8. def execute
  9. Service::CheckFeatureEnabled.new(name: integration_setting_name).execute
  10. return [] if issue_links.blank?
  11. issue_tracker_object.issues_by_urls(issue_links)[:issues] || []
  12. end
  13. end