when filter contains name string, purge prompt does not retrieve object names correctly

Bug #1155821 reported by Eric Peterson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Lin Hua Cheng

Bug Description

horizon.tables.js - line 141

Within this file, it create the prompt for the purge batch actions. So for example
      You selected "projecta", "projectb". Please confirm this action.

The problem lies when the filter contains a field with the string "name" in it. The jquery location of the table cell finds the cell from the filter, and not the table column heading cell.

Ideally, the method get_object_display() should be used.... but even this is not being called/used.

Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

I think on line 141 in that file.... instead of first() - use the last() call.

This would be the quick fix, but again - ideally it seems like get_object_display() should be used for this.

Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

I take back the first / last comment but you get the idea. A smarter jquery call could help here. ;)

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
status: New → Confirmed
Changed in horizon:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/24935

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/24935
Committed: http://github.com/openstack/horizon/commit/bf5655d8f324a7fbcb91b796e032c7e39fabbbe5
Submitter: Jenkins
Branch: master

commit bf5655d8f324a7fbcb91b796e032c7e39fabbbe5
Author: Lin Hua Cheng <email address hidden>
Date: Wed Mar 20 14:44:11 2013 -0700

    Enhancement on prompts to list selected objects.

    Used the display name from table.get_object_display(datum), instead
    of explicitly looking for the first occurance of table header that
    contains 'Name'.

    Fallback mode: tables with no valid get_object_display(datum)
    won't list selected objects.

    Fixes bug 1155821

    Change-Id: Iff4ee8500eb57f39a9bcb199c7eb2be7fa3e4ec4

Changed in horizon:
status: In Progress → Fix Committed
Kieran Spear (kspear)
Changed in horizon:
milestone: none → havana-1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.