Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAT-2058: GAT Live Release - v4.0.1 #990

Merged
merged 23 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
de6b6c2
GAT-1887: Cleanup
reubensamuel Mar 1, 2023
8bb6747
Merge pull request #972 from HDRUK/GAT-1887-UAT-REU1
reubensamuel Mar 1, 2023
a6e552b
GAT-1887: Cleanup
reubensamuel Mar 1, 2023
6ec3645
Merge pull request #973 from HDRUK/GAT-1887-PREPROD-REU1
reubensamuel Mar 1, 2023
052d5f4
GAT-1887: Cleanup
reubensamuel Mar 1, 2023
7889ebe
Merge pull request #974 from HDRUK/GAT-1887-DEV
reubensamuel Mar 1, 2023
84b6a4c
GAT-2094: Disable 0/1 testing
reubensamuel Mar 3, 2023
4b30982
Merge pull request #980 from HDRUK/GAT-2094
reubensamuel Mar 3, 2023
be437fa
update counter for related objects with elements from datauserregister
dnhdruk Mar 6, 2023
6e3688f
update chart.yml
dnhdruk Mar 6, 2023
c0599aa
update chart.yml revert
dnhdruk Mar 6, 2023
e98019b
Merge pull request #981 from HDRUK/features/GAT-2058
dnhdruk Mar 6, 2023
91c7c81
GAT-1887: Disable 0/1 testing
reubensamuel Mar 8, 2023
1fada21
Merge pull request #982 from HDRUK/GAT-1887-UAT-REU2
reubensamuel Mar 8, 2023
61a2187
GAT-1887: Disable 0/1 testing
reubensamuel Mar 8, 2023
189d8ec
Merge pull request #983 from HDRUK/GAT-1887-PREPROD-REU2
reubensamuel Mar 8, 2023
d7696d8
update chart yam GAT-2058
dnhdruk Mar 8, 2023
047cb09
Merge pull request #985 from HDRUK/features/update_chart_400_to_401
dnhdruk Mar 8, 2023
acce9ba
Resolved merge conflict
dnhdruk Mar 8, 2023
2cf14f5
Merge pull request #987 from HDRUK/dev
dnhdruk Mar 8, 2023
5506456
Resolved merge conflict
dnhdruk Mar 8, 2023
cecddc6
Merge pull request #988 from HDRUK/release
dnhdruk Mar 8, 2023
b3c2b8a
GAT-1887: Resolve Merge conflict
reubensamuel Mar 14, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/dev_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- 'dev'
# paths:
# - 'Chart.yaml'
# paths:
# - 'Chart.yaml'

env:
PROJECT_ID: '${{ secrets.PROJECT_ID }}' # TODO: update Google Cloud project id.
Expand Down Expand Up @@ -155,4 +155,4 @@ jobs:
channel: ${{ env.SLACK_CHANNEL }}
message: Deploying {{ env.GITHUB_REF_NAME }} branch
if: always()
# If required, use the Cloud Run url output in later steps
# If required, use the Cloud Run url output in later steps
Empty file modified .github/workflows/preprod_deployment.yaml
100644 → 100755
Empty file.
Empty file modified .github/workflows/prod_deployment.yaml
100644 → 100755
Empty file.
Empty file modified .github/workflows/uat_deployment.yaml
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.0.0
v4.0.1
36 changes: 36 additions & 0 deletions src/resources/search/search.repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import moment from 'moment';
import helperUtil from '../utilities/helper.util';

export async function getObjectResult(type, searchAll, searchQuery, startIndex, maxResults, sort, authorID, form) {

let collection = Data;
if (type === 'course') {
collection = Course;
Expand Down Expand Up @@ -278,6 +279,33 @@ export async function getObjectResult(type, searchAll, searchQuery, startIndex,
as: 'relatedResourcesCourses',
},
},
{
$lookup: {
from: 'datauseregisters',
let: {
pid: '$pid',
},
pipeline: [
{ $unwind: '$relatedObjects' },
{
$match: {
$expr: {
$and: [
{
$eq: ['$relatedObjects.pid', '$$pid'],
},
{
$eq: ['$activeflag', 'active'],
},
],
},
},
},
{ $group: { _id: null, count: { $sum: 1 } } },
],
as: 'relatedResourcesDataUseRegister',
},
},
{
$project: {
_id: 0,
Expand Down Expand Up @@ -353,11 +381,19 @@ export async function getObjectResult(type, searchAll, searchQuery, startIndex,
else: { $first: '$relatedResourcesCourses.count' },
},
},
{
$cond: {
if: { $eq: [{ $size: '$relatedResourcesDataUseRegister' }, 0] },
then: 0,
else: { $first: '$relatedResourcesDataUseRegister.count' },
},
},
],
},
},
},
];

} else {
queryObject = [
{ $match: newSearchQuery },
Expand Down