This happened because you used the same bug for master and 4.0.
The Gerrit hook doesn't verify status between major versions, only inside a single version (for e.g, it would not move to modified if you needed to backport to 4.0.1 and the target milestone was 4.0.1).
I'm not sure how we can tackle this, because master has no meaning in bugzilla, it doesn't correlate to a version.

One think I can think of, is NOT to move bugs to MODIFIED is a patch was merged on master branch... , will that help? 


On Tue, Jul 19, 2016 at 8:07 AM, Michal Skrivanek <mskrivan@redhat.com> wrote:
Example in bug https://bugzilla.redhat.com/show_bug.cgi?id=1357440
It doesn't take into account branches

Thanks,
michal



--
Eyal Edri
Associate Manager
RHEV DevOps
EMEA ENG Virtualization R&D
Red Hat Israel

phone: +972-9-7692018
irc: eedri (on #tlv #rhev-dev #rhev-integ)