Skip to content

Orphaned duplicate rows created when user adds a calendar #323

@groybal

Description

@groybal

Steps to reproduce:

  1. log in as student
  2. in Calendar portlet, click Options --> Edit
  3. click "Add a Calendar"
  4. enter values for "Calendar name" and "Calendar URL" and click the "Save calendar" button
  5. check CALENDAR_STORE table and notice how there are two new rows with the calendar name you entered
  6. check CALENDAR_PREFERENCE table and notice how there are two new rows with the calendar URL you entered
  7. in Calendar portlet edit screen, click "Edit Calendar" next to the new calendar you added (notice the "My Calendars" list does not have a duplicate entry)
  8. change the value for "Calendar name" and "Calendar URL" and click the "Save calendar" button
  9. check CALENDAR_STORE table and notice the last row was updated but the second to last row has the original value from step 4
  10. check CALENDAR_PREFERENCE table and notice the last row was updated but the second to last row has the original value from step 4
  11. check CALENDAR_CONFIGURATION table and notice there are no rows with CALENDAR_ID value that references the second to last rows in CALENDAR_STORE and CALENDAR_PREFERENCE (thus those rows are orphaned)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions