Bug 1021584 - message in the 'remove' confirmation dialog cannot be overridden in some cases
message in the 'remove' confirmation dialog cannot be overridden in some cases
Product: oVirt
Classification: Community
Component: ovirt-engine-webadmin (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.4.0
Assigned To: Greg Sheremeta
Martin Pavlik
: CodeChange
Depends On:
  Show dependency treegraph
Reported: 2013-10-21 11:00 EDT by Einav Cohen
Modified: 2016-01-28 16:56 EST (History)
9 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-03-31 08:31:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 20471 None None None Never

  None (edit)
Description Einav Cohen 2013-10-21 11:00:40 EDT
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$
        } else {

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

Comment 1 Sandro Bonazzola 2014-01-13 08:56:27 EST
oVirt 3.4.0 alpha has been released including the fix for this issue.
Comment 2 Martin Pavlik 2014-02-18 10:30:35 EST

can you please advise how to test this?
Comment 3 Greg Sheremeta 2014-02-18 12:04:16 EST
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 02:27:03 EST
works with ovirt-3.4.0-beta2
Comment 5 Sandro Bonazzola 2014-03-31 08:31:30 EDT
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.