Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3315

Duplicate functions are created when saving realm functions

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Problem Statement/Rationale

      What is going wrong? What action would you like the Engineering team to take?

      On realm.mongodb.com, when adding a new trigger to an application, multiple new functions are created when the trigger has validation errors. When clicking save, the function is created even when the trigger is not. Upon a 2nd save, I get an error saying the function name already exists.

      Furthermore, after deleting the duplicate function, it still appears under the "Recently Opened". But no longer appears under the list of functions.

      Steps to Reproduce

      How could an engineer replicate the issue you're reporting?

      1. Create a new trigger on https://realm.mongodb.com/groups//apps//triggers/new
      2. Specify Operation Type: update
      3. Specify a Function as "+ New Function"
      4. Make something invalid such as an invalid project expression {"updateDescription.updatedFields.FieldA": 1}
      5. Click Save
      6. An error message is shown at the top.
      7. Fix the errors and Save again to receive a message that the function already exists. Change the function name to be able to save your settings.
      8. After deleting the first function that was created, observe on https://realm.mongodb.com/groups/*/apps/*/dashboard that it is still shown under recently opened.

      Expected Results

      What do you expect to happen?

      1. Realm configuration should only be modified after all validations pass.
      2. Deleted configuration should no longer be visible throughout the site.

      Actual Results

      What do you observe is happening?

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            Unassigned Unassigned
            Reporter:
            michaellee1019@gmail.com Michael L
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: