feat: comment to test run's case (#390)
This commit is contained in:
@@ -109,7 +109,19 @@ export default function (sequelize) {
|
||||
},
|
||||
{
|
||||
model: RunCase,
|
||||
attributes: ['id', 'runId', 'status'],
|
||||
attributes: [
|
||||
'id',
|
||||
'runId',
|
||||
'status',
|
||||
[
|
||||
sequelize.literal(
|
||||
'(SELECT COUNT(*) FROM `comments` WHERE `comments`.`commentableType` = ' +
|
||||
sequelize.escape('RunCase') +
|
||||
' AND `comments`.`commentableId` = `RunCases`.`id`)'
|
||||
),
|
||||
'commentCount',
|
||||
],
|
||||
],
|
||||
// Must be 'true' when filtering by status, otherwise all cases are returned.
|
||||
required: runCaseRequired,
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user