diff options
author | dklawren <dklawren@users.noreply.github.com> | 2018-09-24 16:53:23 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-09-24 16:53:23 +0200 |
commit | 6a87c6d646f28edd54961b4a967d9de2e4b7b66a (patch) | |
tree | e31a1d03f7281edc4e221b110e39c15aa93ad3a6 | |
parent | ab743ac5f848e2168110b1d9720c893a89c04e7e (diff) | |
download | bugzilla-6a87c6d646f28edd54961b4a967d9de2e4b7b66a.tar.gz bugzilla-6a87c6d646f28edd54961b4a967d9de2e4b7b66a.tar.xz |
Bug 1492346 - scripts/syncflags.pl should also add the target product to any tracking flags that the source product is a member
-rwxr-xr-x | scripts/syncflags.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/syncflags.pl b/scripts/syncflags.pl index e6b521e62..c99fd5160 100755 --- a/scripts/syncflags.pl +++ b/scripts/syncflags.pl @@ -75,6 +75,7 @@ if (!$tgtprodid) { exit(1); } +# Normal flags such as bug flags and attachment flags $dbh->do("INSERT INTO flaginclusions(component_id, type_id, product_id) SELECT fi1.component_id, fi1.type_id, ? FROM flaginclusions fi1 LEFT JOIN flaginclusions fi2 @@ -85,6 +86,17 @@ $dbh->do("INSERT INTO flaginclusions(component_id, type_id, product_id) undef, $tgtprodid, $tgtprodid, $srcprodid); +# Tracking type flags +$dbh->do("INSERT INTO tracking_flags_visibility (tracking_flag_id, product_id, component_id) + SELECT tf1.tracking_flag_id, ?, tf1.component_id FROM tracking_flags_visibility tf1 + LEFT JOIN tracking_flags_visibility tf2 + ON tf1.tracking_flag_id = tf2.tracking_flag_id + AND tf2.product_id = ? + WHERE tf1.product_id = ? + AND tf2.tracking_flag_id IS NULL", + undef, + $tgtprodid, $tgtprodid, $srcprodid); + # It's complex to determine which items now need to be flushed from memcached. # As this is expected to be a rare event, we just flush the entire cache. Bugzilla->memcached->clear_all(); |