Skip to content

Commit

Permalink
Update query to show project info
Browse files Browse the repository at this point in the history
  • Loading branch information
Nateowami committed Dec 4, 2024
1 parent a7d1bc5 commit 908e0ae
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion mongodb/Projects/ActiveTranslateProjects.mongodb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,16 @@ db.texts.aggregate([
}},
{$group: {
_id: {$first: { $split: ["$_id", ":"] } }
}},
{$lookup: {
from: 'sf_projects',
localField: '_id',
foreignField: '_id',
as: 'project'
}},
{$unwind: '$project'},
{$project: {
name: '$project.name',
shortName: '$project.shortName'
}}
]).toArray()
]).toArray();

0 comments on commit 908e0ae

Please sign in to comment.