Bug 1021584 - message in the 'remove' confirmation dialog cannot be overridden in some cases
Summary: message in the 'remove' confirmation dialog cannot be overridden in some cases
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: 3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.4.0
Assignee: Greg Sheremeta
QA Contact: Martin Pavlik
URL:
Whiteboard: ux
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-21 15:00 UTC by Einav Cohen
Modified: 2016-01-28 21:56 UTC (History)
9 users (show)

Fixed In Version: ovirt-3.4.0-alpha1
Clone Of:
Environment:
Last Closed: 2014-03-31 12:31:30 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 20471 0 None None None Never

Description Einav Cohen 2013-10-21 15:00:40 UTC
today, if you are using RemoveConfirmationPopupView and you want to override the default "Are you sure you want to remove the following items?" [constants.removeConfirmationPopupMessage message], you cannot do that if the dialog's HashName is starting with "remove_" [1].

need to change the code so that we will not depend on the HashName value at all:
   * set the constants.removeConfirmationPopupMessage message as the default message of this dialog (regardless of HashName).
   * message can always be overridden (again - regardless of HashName).

also need to go over the code and look for all cases in which 'setMessage' is called on a RemoveConfirmationPopupView instance that has its 'HashName' set to something that starts with "remove_".
currently, the above "setMessage" invocations are doing nothing. 
after the fix, they will actually change the message within the dialog - need to make sure that each one of these 'setMessage' invocations is OK (i.e. the message is set to something appropriate to the relevant dialog instance), or maybe the 'setMessage' invocation should be removed, in order to preserve the current behavior of using the default message.

[1] From RemoveConfirmationPopupView.java:

    public void setMessage(String message) {
        if (getHashName() != null && getHashName().startsWith("remove_")) { //$NON-NLS-1$
            super.setMessage(constants.removeConfirmationPopupMessage());
        } else {
            super.setMessage(message);
        }
    }

more info in thread that has been started by this e-mail:

http://lists.ovirt.org/pipermail/engine-devel/2013-October/005731.html

Comment 1 Sandro Bonazzola 2014-01-13 13:56:27 UTC
oVirt 3.4.0 alpha has been released including the fix for this issue.

Comment 2 Martin Pavlik 2014-02-18 15:30:35 UTC
Greg,

can you please advise how to test this?

Comment 3 Greg Sheremeta 2014-02-18 17:04:16 UTC
It's a refactor, so only need to test for regressions. No user feature here.

As long as remove dialogs still popup and contain a message, we're good.

Example: delete anything (host, vm, dc, etc.). If you get a popup that says "Are you sure you want to remove the following items?" then we are good.

Comment 4 Martin Pavlik 2014-02-19 07:27:03 UTC
works with ovirt-3.4.0-beta2

Comment 5 Sandro Bonazzola 2014-03-31 12:31:30 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released


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