mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 10:52:41 +01:00
c013108675
Summary: Ref T8726. This deals with all the Differential diff fields, same deal as previous changes. Test Plan: - Wrote a rule with every field. - Migrated it. - Saw the same rule working. - Rigged the hell out of transcripts (diffs normally do not generate transcripts, because the only action is "block" and they don't exist yet when Herald runs). - Verified that all fields looked sensible in the transcript. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8726 Differential Revision: https://secure.phabricator.com/D13590
55 lines
1.9 KiB
SQL
55 lines
1.9 KiB
SQL
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.affected'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'diff-file';
|
|
|
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.author'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'author';
|
|
|
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.author.projects'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'authorprojects';
|
|
|
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.new'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'diff-added-content';
|
|
|
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.content'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'diff-content';
|
|
|
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.old'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'diff-removed-content';
|
|
|
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.repository'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'repository';
|
|
|
|
UPDATE {$NAMESPACE}_herald.herald_condition c
|
|
JOIN {$NAMESPACE}_herald.herald_rule r
|
|
ON c.ruleID = r.id
|
|
SET c.fieldName = 'differential.diff.repository.projects'
|
|
WHERE r.contentType = 'differential.diff'
|
|
AND c.fieldName = 'repository-projects';
|