Edit current project will disable it

Bug #1413068 reported by Xi Jia
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Timur Sufiev

Bug Description

If you edit current project in horizon, the current project will be disabled.

Reproduce process:

1. Log into horizon.
2. Click project panel under identity dashboard.
3. Edit the current project, then click update
4. Meet errors, the project has been disabled after re-log in

Root Cause:

1. The "enabled" checkbox in "project info" step is disabled when user try to edit current project.
2. All the disabled checkbox will be regarded as False when user post the form data.
3. So that, it will disable the current project when try to edit it.

Revision history for this message
Xi Jia (xijiax) wrote :
Revision history for this message
Nikunj Aggarwal (nikunj2512) wrote :

Not able to understand what the problem you are facing.

Please can you explain it.

Also i didn't see the checkbox disabled.
What you changed in the project when you clicked the "Edit project"??

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Weird, could be a consequence of fixing bug 1398331, will check it in a while...

Changed in horizon:
assignee: nobody → Timur Sufiev (tsufiev-x)
Revision history for this message
lilly (lilly-spandanabarukula) wrote :

Can you please explain it clearly ?

the project is enabled only when i tried it

Revision history for this message
Xi Jia (xijiax) wrote :

Sorry for my unclear description.

1. Make sure that you are editing the current project.

For example, after you log in, select project "Public" at the top. Then go to identity -> projects to edit project "Public".

or you can directly edit the project same with top bar.

2. You will find a checkbox with label "Enabled" in the step "Project information" of workflow. It has been disabled with help text "You cannot disable your current project"

3. Do everything you want and click save. You will meet the errors.

It is a consequence of fixing bug 1398331.

When post workflow's data, the disabled checkbox will be regarded with value "False", even it is checked. Might be the root cause.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Indeed, it happened after the fix. Can't believe I didn't notice it that time :(. Setting severity to High because now it's impossible to edit current project at all. I'll provide a fix shortly.

Changed in horizon:
importance: Undecided → High
status: New → Triaged
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/149303

Changed in horizon:
status: Triaged → In Progress
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Also, I will add a test method in Identity->Projects integration tests suite once the foundation for it (https://review.openstack.org/#/c/110919/) is finished.

Revision history for this message
Xi Jia (xijiax) wrote :

Thanks a lot !

Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → Vlad Okhrimenko (vokhrimenko)
Changed in horizon:
assignee: Vlad Okhrimenko (vokhrimenko) → Timur Sufiev (tsufiev-x)
David Lyle (david-lyle)
Changed in horizon:
milestone: none → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/149303
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=525cf78293fd376b9fe161c04525575ae57e1d77
Submitter: Jenkins
Branch: master

commit 525cf78293fd376b9fe161c04525575ae57e1d77
Author: Timur Sufiev <email address hidden>
Date: Thu Jan 22 18:00:55 2015 +0300

    Fix editing current project

    The fix 257cf490 introduced a regression by disabling 'Enable'
    checkbox in case of editing current project - because Django treats
    disabled checkbox as providing the ``False`` value regardless of its
    actual value. Fix it by restoring 'Enable' checkbox value in form's
    ``clean()`` method.

    Change-Id: Iaede347b5a8a06a793de2dd62ba8a695f3498ead
    Closes-Bug: #1413068

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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