Repo edition doesn't keep parameters

Issue #231 resolved
Alexandre Huppé created an issue

When editing an existing grouped repo, I noticed that the 'repository Group' field is always blank, even if a repo is grouped. So if I want to change any setting from a repo, I need to remember to set the group field each time if I don't want to move my repo out of it's group.

Could this field show the actual value when the edit page is loaded?

Comments (9)

  1. Alexandre Huppé reporter

    I just did a fresh install (with the tip: r1514) and the current group isn't displayed When I edit a repo or even a group.

    I've attached 2 snapshots (just to be certain we're talking about the same thing). The first one shows 3 new repos. The second is what I see when I edit the 'SRepo', a repo withing a subgroup. The same thing happens when I edit a repo in a Group.

    Anything I can do to help you reproduce the same behavior?

  2. Marcin Kuzminski repo owner

    I don't know, i just created same repos on hg.rhodecode.org and it's ok.

    can you see html and if selected="selected" is in select field next to proper option ?

  3. Alexandre Huppé reporter

    Here's the htlm for the field...

    for repo edition:

    <select class="medium" id="repo_group" name="repo_group">
    <option selected="selected" value=""></option>
    <option value="1">Group1</option>
    <option value="3">Group1»SubGroup1</option>
    <option value="2">Group2</option>
    </select>
    

    for group edition:

    <select class="medium" id="group_parent_id" name="group_parent_id">
    <option selected="selected" value=""></option>
    <option value="1">Group1</option>
    <option value="2">Group2</option>
    </select>
    
  4. Marcin Kuzminski repo owner

    then it's code debugging, are you running it on windows by any chance ?? What does

            defaults['repo_group'] = getattr(group[-1] if group else None,
                                             'group_id', None)
    

    returns in line 126 of controllers/admin/repos.py

  5. Alexandre Huppé reporter

    Browsing in Chrome in Win7x64, but server's on Ubuntu 10.04 Server

    and for the line 126... defaults['repo_group']=3, which is the correct value (in html SubGroup1=3)

    anyway, if I save, even if defaults['repo_group']=3, the repo is moved in group 'None'.

  6. Alexandre Huppé reporter

    BTW, I just tested with other browsers...IE 9 and Firefox 3.6 don't show anything different

  7. Marcin Kuzminski repo owner

    Turns out formencode bug, fixed in latest rhodecode by version freeze You need to get formencode 1.2.4 to get this bug fixed

  8. Log in to comment