Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1251

Fix "nuxeo-group-deleted" event to contain the name of the deleted group

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.34, 3.0.2
    • Component/s: UI
    • Release Notes Summary:
      The event "nuxeo-group-deleted" is fired when a group is deleted.
    • Backlog priority:
      600

      Description

       When a group is deleted from the "nuxeo-group-management" element, the "group" value is overwritten by the empty response of the DELETE call

          <nuxeo-resource id="editRequest" path="group/[[groupname]]" response="{{group}}"
            headers='{"fetch.group": "memberUsers,memberGroups"}'></nuxeo-resource> 
      _deleteGroup() {
                this.$.deleteGroupDialog.toggle();
                this.$.editRequest.data = this.group;
                this.$.editRequest.remove().then(() => {
                  this.dispatchEvent(new CustomEvent('nuxeo-group-deleted', {
                    composed: true,
                    bubbles: true,
                    detail: this.group,
                  }));
                  this._goHome();
                });
              }
      

      If someone want to use the value set in the "detail" field of the CustomEvent, only an empty value will be available.

      Expected behavior: the custom event is sent with the current group set in the "detail" field

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m