Bug 1164744 - Cannot add action to roles
Summary: Cannot add action to roles
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.6.0
Assignee: Alexander Wels
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-17 09:58 UTC by Shahar Havivi
Modified: 2016-02-10 19:34 UTC (History)
9 users (show)

Fixed In Version: ovirt-engine-3.6.0-0.0.master.20150412172306.git55ba764
Clone Of:
Environment:
Last Closed: 2015-11-04 11:30:18 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 35349 0 master MERGED webadmin: detach handlers on hide Never

Description Shahar Havivi 2014-11-17 09:58:54 UTC
Description of problem:
When adding a new role with actions only the role added, no actions is set,
This is true to edit role (tested in REST as well with no success).

How reproducible (UI):
1. Press "configure" at the right corner at the top toolbar
2. Press "new" button
3. set the name for the role and select few actions (such as Template->Basic Operations->Edit Properties)
4. edit the same role that you added - the actions where never saved

Comment 1 Oved Ourfali 2014-11-18 08:37:37 UTC
Works well on the 3.5 branch.
Moving fix target to 3.6.

Comment 2 Yair Zaslavsky 2014-11-18 10:14:07 UTC
Shahar, on which branch you're testing this?

Comment 3 Oved Ourfali 2014-11-18 10:16:26 UTC
Seems like it works well on 3.5, and not on master.
In addition, I debugged the issue and the engine gets only the LOGIN action group.
The selection in the UI is being ignored totally.
Also, it works well on the REST API, as opposed to what is selected in the description.

Alexander - can you assist us with that?

Comment 4 Shahar Havivi 2014-11-18 11:08:12 UTC
on branch master and its work on REST not in the UI

Comment 5 Alexander Wels 2014-11-18 14:16:51 UTC
Yes this is most likely due to my giant re-factor patch [1], I will take a look at it now.


[1] http://gerrit.ovirt.org/#/c/34193/

Comment 6 Alexander Wels 2014-11-19 14:36:49 UTC
Okay it turns out the patch has nothing to do with the problem. For some reason the detach handler is fired right before the tree is shown, this removes the handlers from the tree that handle the clicks. This causes the selection to not be reflected in the backing model. So in essence it doesn't register the fact that certain actions are assigned to the role which results in the observed behaviour.

I am trying to figure out why the detach handler is fired right before the tree becomes visible.

Comment 7 Einav Cohen 2014-11-19 14:47:19 UTC
(In reply to Alexander Wels from comment #6)
> Okay it turns out the patch has nothing to do with the problem. For some
> reason the detach handler is fired right before the tree is shown, this
> removes the handlers from the tree that handle the clicks. This causes the
> selection to not be reflected in the backing model. So in essence it doesn't
> register the fact that certain actions are assigned to the role which
> results in the observed behaviour.
> 
> I am trying to figure out why the detach handler is fired right before the
> tree becomes visible.

Thanks, Alexander - maybe worth finding out what is the patch that caused this using 'git blame' or similar - once you find out what it the exact piece of code responsible for the current behavior (this should be a fairly-recent patch, given that it doesn't reproduce in 3.5 - only in 'master')?

Comment 8 Alexander Wels 2014-11-19 16:26:20 UTC
I haven't figured out what happened to make this break, but I have found a good solution to the problem, so I am posting a patch.

Comment 9 Einav Cohen 2014-11-19 16:43:01 UTC
since this BZ is marked as 'urgent', I am changing the Target Release to '3.5.1'.

Comment 10 Alexander Wels 2014-11-19 17:51:48 UTC
Since this doesn't appear to happen in 3.5, not sure why we are going to back port it. The patch should have no issues being back ported, but it is definitely a master only issue.

@Einav
Are you sure you want to get this back ported to 3.5

Comment 11 Einav Cohen 2014-11-19 17:57:02 UTC
(In reply to Alexander Wels from comment #10)
> Since this doesn't appear to happen in 3.5, not sure why we are going to
> back port it. The patch should have no issues being back ported, but it is
> definitely a master only issue.
> 
> @Einav
> Are you sure you want to get this back ported to 3.5

my mistake - thanks for correcting me, Alexander. 
Re-targeting for 3.6.

Comment 12 Ondra Machacek 2015-05-12 08:38:25 UTC
Works OK with ovirt-engine-3.6.0-0.0.master.20150412172301.git55ba764.el7.centos.noarch

Comment 13 Sandro Bonazzola 2015-11-04 11:30:18 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.


Note You need to log in before you can comment on or make changes to this bug.