Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove owner concept #1181

Merged
merged 10 commits into from
Feb 11, 2025
Merged

Remove owner concept #1181

merged 10 commits into from
Feb 11, 2025

Conversation

wrigleyDan
Copy link
Contributor

@wrigleyDan wrigleyDan commented Jan 17, 2025

Description

This PR removes the owner concept.

Cases are no longer owned by users with this change.

Motivation and Context

Remove the concept of Owners from Quepid. It's a relict from old times that does not provide any additional value.

closes #1180

How Has This Been Tested?

Screenshots or GIFs (if appropriate):

Types of changes

  • [] Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • [] New feature (non-breaking change which adds new functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • [] My change requires a change to the documentation.
  • [] I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • [] I have added tests to cover my changes.
  • All new and existing tests passed.

@wrigleyDan wrigleyDan self-assigned this Jan 17, 2025
@wrigleyDan wrigleyDan linked an issue Jan 17, 2025 that may be closed by this pull request
8 tasks
@epugh
Copy link
Member

epugh commented Jan 18, 2025

I am going to poke at this... just in case I can get Quepid 8 out this weekend...

@epugh
Copy link
Member

epugh commented Jan 18, 2025

I changed my mind on pushing furthur... I think you have good progress! I'd love to get this in next week. Ping me about pairing if needed.

@epugh
Copy link
Member

epugh commented Jan 19, 2025

can't wait to see simpler quereis. This guy;s mean is 247 ms

SELECT DISTINCT cases.*, ( SELECT COUNT(queries.id) FROM queries WHERE case_id = cases.id ) AS queries_count, `cases`.`id` AS t0_r0, `case_metadata`.`user_id` AS t1_r0, `case_metadata`.`case_id` AS t1_r1, `case_metadata`.`last_viewed_at` AS t1_r2, `case_metadata`.`id` AS t1_r3 FROM `cases` LEFT OUTER JOIN `teams_cases` ON `teams_cases`.`case_id` = `cases`.`id` LEFT OUTER JOIN `teams` ON `teams`.`id` = `teams_cases`.`team_id` LEFT OUTER JOIN `teams_members` ON `teams_members`.`team_id` = `teams`.`id` LEFT OUTER JOIN `users` ON `users`.`id` = `teams_members`.`member_id` LEFT OUTER JOIN `case_metadata` ON `case_metadata`.`case_id` = `cases`.`id` WHERE (`teams_members`.`member_id` = 20 OR `cases`.`owner_id` = 20) AND (`cases`.`archived` = false OR `cases`.`archived` IS NULL) AND `cases`.`id` IN (8458, 8461, 6789, 6789, 601, 8461, 640, 8197, 8460, 3628, 1535, 8315, 6009, 7710, 8457, 4848, 4848, 4060, 601, 7713, 8217, 8239, 8239, 8215, 8217, 8215, 6789, 8197, 5541, 601) ORDER BY `case_metadata`.`last_viewed_at` ...

and this one is 1241ms:

SELECT DISTINCT `case_metadata`.`last_viewed_at`, `cases`.`id` AS alias_0, `cases`.`id` FROM `cases` LEFT OUTER JOIN `teams_cases` ON `teams_cases`.`case_id` = `cases`.`id` LEFT OUTER JOIN `teams` ON `teams`.`id` = `teams_cases`.`team_id` LEFT OUTER JOIN `teams_members` ON `teams_members`.`team_id` = `teams`.`id` LEFT OUTER JOIN `users` ON `users`.`id` = `teams_members`.`member_id` LEFT OUTER JOIN `case_metadata` ON `case_metadata`.`case_id` = `cases`.`id` WHERE (`teams_members`.`member_id` = 20 OR `cases`.`owner_id` = 20) AND (`cases`.`archived` = false OR `cases`.`archived` IS NULL) ORDER BY `case_metadata`.`last_viewed_at` DESC, `cases`.`id` DESC LIMIT 30

Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com>
Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com>
@wrigleyDan wrigleyDan changed the title [WIP] Remove owner concept Remove owner concept Feb 6, 2025
Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com>
Signed-off-by: wrigleyDan <dwrigley@opensourceconnections.com>
@wrigleyDan wrigleyDan requested a review from epugh February 7, 2025 13:18
@wrigleyDan
Copy link
Contributor Author

@epugh Did some basic frontend testing (create a case, view different pages that had case owner specific information) and polishing (removing all the comments that were left from the work on this change) and to me this seems ready to go. Let me know if there's anything else that needs doing here.

@epugh
Copy link
Member

epugh commented Feb 7, 2025

Will look more... I love a commit that adds 36 lines and removes almost 10x that... 313 lines!

@epugh epugh merged commit 30e41f3 into main Feb 11, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of Owner concept
2 participants