def is_expected_inconsistent_change_field()

in bugbug/bug_snapshot.py [0:0]


def is_expected_inconsistent_change_field(field, bug_id, new_value, new_value_exp):
    # The 'enhancement' severity has been removed, but it doesn't show up in the history.
    # See https://bugzilla.mozilla.org/show_bug.cgi?id=1541362.
    return (
        (field in ["status", "resolution", "cf_last_resolved"] and bug_id == 1_312_722)
        or (field == "cf_last_resolved" and bug_id == 1_321_567)
        or (
            field == "url"
            and bug_id
            in (
                380637,
                740_223,
                1326518,
                1335350,
                1340490,
                1378065,
                1381475,
                1389540,
                1395484,
                1403353,
            )
        )
        or (field == "severity" and new_value == "enhancement")
        or (field == "cf_blocking_20" and bug_id == 380637)
        or (field == "cf_blocking_191" and bug_id in (471015, 607222))
        or (field == "cf_blocking_192" and bug_id == 607222)
        or (field == "cf_status_firefox_esr45" and bug_id == 1292534)
        or (
            field == "cf_status_firefox_esr52"
            and bug_id in [1_436_341, 1_443_518, 1_443_637]
        )
        or (
            field == "cf_status_firefox57"
            and bug_id
            in [
                1_328_936,
                1_381_197,
                1_382_577,
                1_382_605,
                1_382_606,
                1_382_607,
                1_382_609,
                1_383_711,
                1_387_511,
                1_394_996,
                1_403_927,
                1_403_977,
                1_404_917,
                1_406_290,
                1_407_347,
                1_409_651,
                1_410_351,
            ]
        )
        or (
            field == "cf_status_firefox58"
            and bug_id
            in [
                1_328_936,
                1_383_870,
                1_394_996,
                1_397_772,
                1_408_468,
                1_418_410,
                1_436_341,
                1_441_537,
                1_443_511,
                1_443_518,
                1_443_527,
                1_443_544,
                1_443_612,
                1_443_630,
                1_443_637,
            ]
        )
        or (
            field == "cf_status_firefox59"
            and bug_id
            in [
                1_328_936,
                1_394_996,
                1_397_772,
                1_403_334,
                1_428_996,
                1_431_306,
                1_436_341,
                1_441_537,
                1_443_511,
                1_443_518,
                1_443_527,
                1_443_533,
                1_443_544,
                1_443_612,
                1_443_630,
                1_443_637,
            ]
        )
        or (
            field == "cf_status_firefox60"
            and bug_id
            in [
                851471,
                1280099,
                1_362_303,
                1_363_862,
                1_375_913,
                1_390_583,
                1_401_847,
                1_402_845,
                1_414_901,
                1_421_387,
                1_434_483,
                1_434_869,
                1_436_287,
                1_437_803,
                1_438_608,
                1_440_146,
                1_441_052,
                1_442_160,
                1_442_186,
                1_442_861,
                1_443_205,
                1_443_368,
                1_443_371,
                1_443_438,
                1_443_507,
                1_443_511,
                1_443_518,
                1_443_525,
                1_443_527,
                1_443_528,
                1_443_533,
                1_443_560,
                1_443_578,
                1_443_585,
                1_443_593,
                1_443_612,
                1_443_630,
                1_443_637,
                1_443_646,
                1_443_650,
                1_443_651,
                1_443_664,
                1442543,
                1443180,
                1443446,
                1443522,
            ]
        )
        or (field == "cf_tracking_firefox60" and bug_id in [1_375_913, 1_439_875])
        or (field == "priority" and bug_id in {1215089, 1_337_747})
        or (
            field == "type" and bug_id == 1540796
        )  # TODO: Remove once https://bugzilla.mozilla.org/show_bug.cgi?id=1550120 is fixed.
        or (
            field == "cf_last_resolved" and bug_id == 1540998
        )  # TODO: Remove once https://bugzilla.mozilla.org/show_bug.cgi?id=1550128 is fixed.
        or (
            field == "type" and bug_id == 1257155
        )  # TODO: Remove once https://bugzilla.mozilla.org/show_bug.cgi?id=1550129 is fixed.
        or (bug_id == 1370035 and field == "cf_has_str")
        or (bug_id == 1400540 and field in ("target_milestone", "status", "resolution"))
        or (bug_id == 1402929 and field == "priority")
        or (field == "whiteboard" and new_value.rstrip() == new_value_exp.rstrip())
        or (
            field == "summary"
            and bug_id
            in (
                1326589,
                1350800,
                1368617,
                1396657,
                1399203,
                1405388,
                1405496,
                1438422,
                1440635,
                1447653,
                1452217,
                1453584,
                1462986,
                1467331,
                1478399,
                1482142,
                1495267,
                1500185,
                1510849,
                1531130,
                1578734,
                1591051,
            )
        )  # https://bugzilla.mozilla.org/show_bug.cgi?id=1556319
        or (field == "whiteboard" and bug_id in (1385923, 1340867))
        or (
            field == "url"
            and bug_id
            in (1362789, 1364792, 1431604, 1437528, 1445898, 1446685, 1460828, 1494587)
        )
        or (field in ("platform", "op_sys") and bug_id == 568516)
        or (
            field == "target_milestone"
            and bug_id in {11050, 19462, 106327, 107264, 144795, 306730}
        )
        or (field == "product" and bug_id in {21438, 263013})
        or is_email(
            new_value
        )  # TODO: Users can change their email, try with all emails from a mapping file.
    )