Project

General

Profile

Actions

Bug #14252

closed

Creating a new organization redirects to list rather than host assignment and edit properties

Added by Brad Buckingham about 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1317846
Description of problem:
In 6.1 when we create new organization we have process described in UI (1)Create Organization-> 2)Select Hosts -> 3)Edit Properties), so we have access to bunch of organization properties in time of entity creation procedure, not editing
In 6.2 when we input name for new organization and push 'submit' button we get entity created right away without possibility to change something for its properties.

If that is intended behavior then we still have a defect as mentioned process (1)Create Organization-> 2)Select Hosts -> 3)Edit Properties) is still visible in UI like workflow is changed, but some parts was forgotten to be removed

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

How reproducible:
Always

Steps to Reproduce:
1. Try to create new organization in UI

Actual results:
Entity created and no access to change any organization property

Expected results:
User has access to organization properties in time of creation procedure
Or
UI should be changed, so he/she didn't expect that such operation can be performed

Additional info:


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #14369: When creating new organization, host selection step won't show, if the user is n context of different organization.ClosedShimon Shtein03/29/2016Actions
Actions #1

Updated by Dominic Cleal about 8 years ago

  • Subject changed from Cannot work with properties when create new organization to Creating a new organization redirects to list rather than host assignment and edit properties
  • Category set to Organizations and Locations

This might just when a current org/loc is selected, count_nil_hosts is incorrectly calculated as the number of hosts without an org/loc because it isn't unscoped. Working in any context ought to avoid the bug. Can't confirm without corresponding debug, preferably SQL logs though.

The wizard ought to still skip step 2 (host assignment) and move to edit if no hosts are available, rather than redirecting to the index.

Actions #2

Updated by Shimon Shtein about 8 years ago

  • Assignee set to Shimon Shtein

As far as I can see count_nil_hosts calculates its value by invoking Host.where(taxonomy_id => nil).count
which is unscoped, unless we set a default scope on host...

Right now the system will move to the second step only if there are hosts that are not assigned to any organization.

Anyway I will add a bypass to move to the third step from the first one, when count_nil_hosts == 0.

Actions #3

Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3368 added
Actions #4

Updated by Shimon Shtein about 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Dominic Cleal almost 8 years ago

Shimon Shtein wrote:

As far as I can see count_nil_hosts calculates its value by invoking Host.where(taxonomy_id => nil).count
which is unscoped, unless we set a default scope on host...

There's a default scope on hosts and all other taxonomy-constrained objects, so it's not unscoped.

Actions #6

Updated by Dominic Cleal almost 8 years ago

  • translation missing: en.field_release set to 136
Actions #7

Updated by Shimon Shtein almost 8 years ago

  • Related to Bug #14369: When creating new organization, host selection step won't show, if the user is n context of different organization. added
Actions

Also available in: Atom PDF