Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1059535 - System activity is updated via power form, irrespective of whether changes were actually made.
Summary: System activity is updated via power form, irrespective of whether changes we...
Alias: None
Product: Beaker
Classification: Community
Component: web UI
Version: 0.14
Hardware: Unspecified
OS: Unspecified
unspecified vote
Target Milestone: 19.0
Assignee: Dan Callaghan
QA Contact: tools-bugs
Depends On: 1070036
TreeView+ depends on / blocked
Reported: 2014-01-30 05:37 UTC by Raymond Mancy
Modified: 2018-02-06 00:41 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-11-25 07:18:20 UTC

Attachments (Terms of Use)

Description Raymond Mancy 2014-01-30 05:37:17 UTC
Description of problem:

See title

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1. Go to power config page of system form. Change nothing
2. Click on 'Save Power Changes'

Actual results:

'Updated Power' appears as a flash message
 Three new entries are added, one for each of:
  * reprovision_distro_tree
  * release_action
  * power_type

The above will repeat on successive clicks of 'Save Power Changes'.

Expected results:

No flash message, no addition to the system activity logs.

Additional info:

Comment 2 Raymond Mancy 2014-01-30 06:49:21 UTC
There are a couple of issues here. The issue with the power type is simple, it's comparing a string and an int on the controller code. 

The reprovision distro and release action are not even checked as to whether or not there has been a change. Even once the code is changed so that they are checked, we should probably be supplying a default (if there is one available in the case of the distro) so we don't get the 'None -> 'PowerOff' etc.

Comment 3 Dan Callaghan 2014-03-03 06:44:26 UTC
This is fixed by the patch for bug 1070036:

Comment 4 Dan Callaghan 2014-09-18 05:44:14 UTC
This was merged to develop as part of the new-system-page branch.

Comment 7 Dan Callaghan 2014-09-24 08:26:47 UTC
(In reply to xuezhi ma from comment #6)
> Whether we not format the '' before compare it with system.power.power_user?
> if 'power_user' in data and data['power_user'] != system.power.power_user:

Right, we are treating None (NULL) distinct from '' (empty string), and so we are logging it as a change even if you just save the form leaving the fields empty.

Comment 10 Dan Callaghan 2014-11-25 07:18:20 UTC
Beaker 19.0 has been released.

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