Skip to content

Commit 0c45eae

Browse files
authored
Merge pull request #872 from GSA/871-handling-non-business-subsystems-in-global-search
Editing the global search SQL query to classify non business subsyste…
2 parents 79964f8 + 18afcaa commit 0c45eae

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

api/controllers/search.controller.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@ exports.searchAll = (req, res) => {
1414
FROM
1515
gear_schema.obj_fisma_archer AS systems
1616
WHERE
17-
systems.\`ex:SystemLevel\` = 'SubSystem'
17+
systems.\`ex:SystemLevel\` = 'SubSystem' AND
18+
systems.\`ex:BusinessApplication\` = 'Yes'
19+
UNION SELECT
20+
fisma_subsystems.\`ex:GEAR_ID\` AS \`Id\`,
21+
fisma_subsystems.\`ex:System_Name\` AS \`Name\`,
22+
fisma_subsystems.\`ex:Description\` AS \`Description\`,
23+
fisma_subsystems.\`ex:Status\` AS \`Status\`,
24+
'FISMA' AS \`GEAR_Type\`,
25+
'FISMA Subsystems Report' AS \`GEAR_Type_Display\`,
26+
'{}' AS \`Other\`
27+
FROM
28+
gear_schema.obj_fisma_archer AS fisma_subsystems
29+
WHERE
30+
fisma_subsystems.\`ex:SystemLevel\` = 'SubSystem' AND
31+
fisma_subsystems.\`ex:BusinessApplication\` = 'No'
1832
UNION SELECT
1933
fisma.\`ex:GEAR_ID\` AS \`Id\`,
2034
fisma.\`ex:System_Name\` AS \`Name\`,

0 commit comments

Comments
 (0)