etrandafir93 / n-vite

MIT License
0 stars 0 forks source link

Bug Report: Unable to Create Multiple Events with the Same "Groom name" and "Bride Name" #6

Closed CristianaQAlexandra closed 1 month ago

CristianaQAlexandra commented 1 month ago

Description:

The host is unable to create two or more events using the same name for the "Groom" and "Bride " fields. Attempting to save an event with a duplicate name results in an error, and the event is not saved.

Test environment" Production Browser: Google Chrome Priority: High Severity: Major

Preconditions:

  1. The N-Vite web page is accessible and fully operational.
  2. The host is logged in to their account
  3. At least one event has already been created with specific names for the "Groom" and "Bride"

Steps to reproduce:

  1. Navigate to the "Upcoming Events" page
  2. Click on "+" to create a new event. The form is successfully displayed.
  3. Complete the form correctly, reusing the same "Groom" and "Bride" names from a previously created event.
  4. After filling in all the details click on the "Save" button.

Actual result:

The new event should be successfully saved and displayed alongside other events on the "Upcoming Events" page, even if the same "Groom" and "Bride" names are used

Expected result:

The event should be saved and displayed with the other events on the "Upcoming Events" page.

Bug evidence: Image attachment Google Cloud logs: link Error message:

java.lang.IllegalArgumentException: Key Andreea-and-Andrei is not unique! We cannot save this event!
    at org.springframework.util.Assert.isTrue(Assert.java:111) ~[spring-core-6.1.11.jar!/:6.1.11]
    at tech.nvite.domain.model.Events.create(Events.java:30) ~[!/:0.0.1-SNAPSHOT]
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]

Screenshot 2024-10-16 230136

etrandafir93 commented 1 month ago

hello @CristianaQAlexandra this should be working now. can you double-check?

@Bogr11 if a evtRef is already in use, we'll use a uuid instead for the newly created event. I think it's a simple (and reasonable) solution.. what do you think?

CristianaQAlexandra commented 1 month ago

Hi @etrandafir93, everything is ok, for now, this solution looks good.