def issue_cache
      @issue_cache ||= begin
        issues_map = all_issues.map do |issue|
          cache_key = [
            issue.fields['plugin'],
            issue.fields['plugin_id']
          ].join('-')

          [cache_key, issue]
        end
        Hash[issues_map]
      end
    end
def issue_cache
      @issue_cache ||= begin
        issues_map = all_issues.map do |issue|
          cache_key = [
            issue.fields['plugin'],
            issue.fields['plugin_id']
          ].join('-')

          [cache_key, issue]
        end
        Hash[issues_map]
      end
    end
Create a hash with all issues where the keys correspond to the field passed
 as an argument.

 This is use by the plugins to check whether a given issue is already in
 the project.
 def all_issues_by_field(field)
   # we don't memoize it because we want it to reflect recently added Issues
   klass = class_for(:issue)

   issues_map = klass.where(category_id: default_issue_category.id).map do |issue|
     [issue.fields[field], issue]
   end
   Hash[issues_map]
 end
 Accesing the library by primary sorting key. Raise an exception unless
 the issue library cache has been initialized.