Unable to save changes to a Group

AI-generated summary

The discussion addresses a bug where changes to a group, such as updating the full name or adding a flair, cannot be saved when the group is marked as “automatic.” mathew.cropper reports that changes appear to save but are not persisted. j.jaffeux confirms the issue, explaining that automatic groups should not allow such edits, suggesting the UI should hide editable fields for these groups. tgxworld acknowledges this as a bug and clarifies that automatic groups should not be accessible for management. The issue is resolved in commit 9176b25. mathew.cropper also raises the question of whether flairs can be added to automatic groups, to which tgxworld responds that they should not be editable for such groups.

Issue: Making any change to a group and trying to save it is unsuccessful. It appears to save, but when you leave the group management page the changes have not taken effect. On returning to the group management page, the changes are not present. I’m seeing no console errors.

Repro steps:

  • Sign in as an admin user
  • Go to /groups
  • Select admins
  • Select manage
  • Change the Full Name of the group
  • Select save
  • Leave the page
  • Navigate back to the page
  • Expected: Changes are saved and visible on the page.
  • Actual: Changes were not saved, and the page is in its original state.

Version: v2.0.0.beta5 +212

HAR file: https://drive.google.com/file/d/1yDDMeSl0ePmsoZ9LoJRN8FjDDSBQ8YLC/view?usp=sharing

3 Likes

I can confirm I can repro this. This is happening because this group is considered an “automatic group” and as such its “Full name” can’t be changed.

@tgxworld I’m not sure if this is new behaviour or not. But maybe we should consider hiding this field when the group is automatic, it’s quite unexpected.

something like:

{{#unless model.automatic}}
  <div class="control-group">
    <label class="control-label" for='full_name'>{{i18n 'groups.manage.full_name'}}</label>

    {{text-field name='full_name'
        class="input-xxlarge group-form-full-name"
        value=model.full_name}}
  </div>
{{/unless}}

in jsapp/templates/components/groups-form-profile-fields.hbs

2 Likes

Oops this is actually a bug. When the group is automatic, groups/admins/manage/profile should not be accessible. I’ll fix.

7 Likes

Thanks @tgxworld. Should we be able to add/edit flairs for those groups as well? I originally came across this because I tried adding a flair and it failed.

You should be able to but not for automatic groups though.

2 Likes

Fixed in

https://github.com/discourse/discourse/commit/9176b2591d4945589cc59496145981ddab47f6b8

6 Likes