Bug/WP-361: Jobs Search - restrict search to a specific portal #896
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The job search is returning jobs from other portal sharing same tenant.
The search query conditions for portal name and query strings is enforcing portal condition correctly.
Related
Changes
Fix the query to force condition logic, add the missing parentheses (portal_match) AND (name_match OR archiveSystemDir_match OR appid_match OR archiveSystemId_match)
Testing
Without this PR, check the issue exists
In the code change the portal name to 'Frontera'.
With dev tools open, run a query like
https://cep.test/workbench/history/jobs?query_string=jup
. See the network call and check the portal name in the job list. It will show names like 'CEP'.Apply this PR.
Run search
https://cep.test/workbench/history/jobs?query_string=jup
again. See the results, no results will be returned.Outside the portal code, tested the query in test client, and checked with and without the fix:
UI
Notes