Modularize all remaining Maniphest Herald fields
Summary:
Ref T8726. The only notable bit here is that the "body" / "title" fields (which are currently shared across a bunch of types) are getting split into application variants.
Among other things, this will let us label the field "Commit message" for commits, for example.
Test Plan:
- Created a rule using all four fields.
- Applied patch, saw rule break ("unknown field").
- Ran storage upgrade, saw rule fix itself in the migration.
- Edited tasks, triggered rule, viewed transcripts.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: eadler, joshuaspence, epriestley
Maniphest Tasks: T8726
Differential Revision: https://secure.phabricator.com/D13501
This commit is contained in:
30
resources/sql/autopatches/20150630.herald.2.sql
Normal file
30
resources/sql/autopatches/20150630.herald.2.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
# This converts old conditions which use common fields like "body" to new
|
||||
# conditions which use modular rules like "Maniphest Task Description".
|
||||
|
||||
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||
ON c.ruleID = r.id
|
||||
SET c.fieldName = 'maniphest.task.title'
|
||||
WHERE r.contentType = 'HeraldManiphestTaskAdapter'
|
||||
AND c.fieldName = 'title';
|
||||
|
||||
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||
ON c.ruleID = r.id
|
||||
SET c.fieldName = 'maniphest.task.description'
|
||||
WHERE r.contentType = 'HeraldManiphestTaskAdapter'
|
||||
AND c.fieldName = 'body';
|
||||
|
||||
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||
ON c.ruleID = r.id
|
||||
SET c.fieldName = 'maniphest.task.author'
|
||||
WHERE r.contentType = 'HeraldManiphestTaskAdapter'
|
||||
AND c.fieldName = 'author';
|
||||
|
||||
UPDATE {$NAMESPACE}_herald.herald_condition c
|
||||
JOIN {$NAMESPACE}_herald.herald_rule r
|
||||
ON c.ruleID = r.id
|
||||
SET c.fieldName = 'maniphest.task.assignee'
|
||||
WHERE r.contentType = 'HeraldManiphestTaskAdapter'
|
||||
AND c.fieldName = 'assignee';
|
||||
Reference in New Issue
Block a user