Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions devtracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,17 @@ def getCacheData(fileName)
else
activityStatuses = 'AND activity_status_code:(2 OR 3 OR 4 OR 5)'
end
if(!query.start_with?("\""))
tempQ = '"' + query + '"'
isInIdentifier = RestClient.get api_simple_log(settings.oipa_api_url + "activity?q=iati_identifier:#{tempQ}&fl=iati_identifier&rows=1")
isInTitle = RestClient.get api_simple_log(settings.oipa_api_url + "activity?q=title_narrative_text:#{tempQ}&fl=iati_identifier&rows=1")
checkInID = Oj.load(isInIdentifier)
checkInTitle = Oj.load(isInTitle)
if(checkInID['response']['numFound'].to_i == 1 || checkInTitle['response']['numFound'].to_i == 1)
query = tempQ
else
end
end
filters = prepareFilters(query.to_s, 'F')
response = solrResponse(query, activityStatuses, 'F', 0, '', '')
if(response['response']['numFound'].to_i > 0)
Expand Down
4 changes: 2 additions & 2 deletions views/partials/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<div class="app-search-form__checkbox">
<div class="govuk-checkboxes govuk-checkboxes--small" data-module="govuk-checkboxes">
<div class="govuk-checkboxes__item">
<input class="govuk-checkboxes__input" id="includeClosed" name="includeClosed" type="checkbox" value="hmrc">
<label class="govuk-label govuk-checkboxes__label" for="includeClosed">
<input class="govuk-checkboxes__input" id="includeClosedProject" name="includeClosedProject" type="checkbox" value="1">
<label class="govuk-label govuk-checkboxes__label" for="includeClosedProject">
Include closed programmes
</label>
</div>
Expand Down