Skip to content

Commit

Permalink
CV2-5608: remove show_parent? method
Browse files Browse the repository at this point in the history
  • Loading branch information
melsawy committed Oct 31, 2024
1 parent 28107ea commit 745f5c4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/check_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,18 +272,11 @@ def alegre_file_similar_items
end

def should_include_related_items?
@options['show_similar'] || show_parent?
end

def show_parent?
search_keys = ['verification_status', 'tags', 'rules', 'language', 'fc_language', 'request_language', 'report_language', 'team_tasks', 'assigned_to', 'channels', 'report_status']
!@options['projects'].blank? && !@options['keyword'].blank? && (search_keys & @options.keys).blank?
@options['show_similar']
end

def get_search_field
field = 'annotated_id'
field = 'parent_id' if !@options['show_similar'] && show_parent?
field
@options['show_similar'] ? 'annotated_id' : 'parent_id'
end

def medias_query(include_related_items = self.should_include_related_items?)
Expand Down

0 comments on commit 745f5c4

Please sign in to comment.