Hi Islam, thanks a lot for your patch, Klaas is responsible for this code parts and he will review it next week (he is on vacation this week). so please stay some more days patient with an answer. thanks adrian Am Donnerstag, 30. September 2010, 02:33:14 schrieb Islam Amer:
Hello,
I was trying out multiple actions in one request and noticed that the notifications contain only the last action.
I looked at the code and found this in /usr/lib/obs/server/BSNotify.pm line 82 :
# FIXME: how to handle multiple actions in one request here ? # right now the last one just wins ....
So here's a proposed fix : add an actions key in the reqinfo hash, that contains an ordered list of hashes that contain the details of the actions.
The Data::Dumper of reqinfo produced by the attached patch looks like this :
$VAR1 = { 'when' => '2010-09-30T00:12:13', 'actions' => [ { 'sourcerevision' => '1', 'sourceproject' => 'Foo:Devel:Personal', 'deletepackage' => undef, 'targetproject' => 'Foo:Trunk', 'sourcepackage' => 'libfoo', 'type' => 'submit', 'targetpackage' => 'libfoo', 'deleteproject' => undef }, { 'sourcerevision' => '1', 'sourceproject' => 'Foo:Devel:Personal', 'deletepackage' => undef, 'targetproject' => 'Foo:Trunk', 'sourcepackage' => 'bar', 'type' => 'submit', 'targetpackage' => 'bar', 'deleteproject' => undef } ], 'author' => 'bob', 'description' => 'Test', 'state' => 'new', 'comment' => undef, 'who' => 'bob', 'sender' => 'bob', 'id' => 32, 'type' => '' };
Is this change acceptable ? If so, I guess the notification plugins will have to be changed to accommodate this.
Thanks, Islam Amer
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org