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

Bug: Project activity on dashboard sometimes triggers internal error #1760

Conversation

myieye
Copy link
Collaborator

@myieye myieye commented Jun 20, 2023

Fixes #1759

Description

The culprit of the Internal Error was PHP's uasort, which we were using to sort activity leaving indices in place. Leaving indices in places potentially makes the array incompatible of being serialized as a JSON array. We don't care about the indices, so they can be tossed using usort instead.

Additionally:

  • Now display date and time and moved it to the far right (because that seemed more intuitive to me)
  • Found something meaningful to put in the "Fields" column as it seemed to be broken,
  • Fixed the partially broken sorting (it was comparing user objects (which are never the same) instead of user names)
  • Added a loading indicator, because loading all activity can take a while

Almost removed the sorting by username before time functionality, but...maybe it's useful and I made enough changes 🤷.
There are no indications that the list is not truly chronological and a truly chronological sort seems more compatible with real-time collaboration.

Yup, I see now that the original code uses tabs and I used spaces.

Screenshots

image

Checklist

  • I have labeled my PR with: bug, feature, engineering, security fix or testing
  • I have performed a self-review of my own code
  • I have reviewed the title & description of this PR which I will use as the squashed PR commit message
  • I have commented my code, particularly in hard-to-understand areas
    I have added tests that prove my fix is effective or that my feature works
  • I have enabled auto-merge (optional)

Testing

Testers, use the following instructions against our staging environment. Post your findings as a comment and include any meaningful screenshots, etc.

  1. View project activity
  2. Make sure the column content seems reasonable
  3. Observe no errors

@myieye myieye added the bug An existing problem with our app in production label Jun 20, 2023
@myieye myieye self-assigned this Jun 20, 2023
@github-actions
Copy link

Unit Test Results

362 tests   362 ✔️  15s ⏱️
  37 suites      0 💤
    1 files        0

Results for commit 2606aef.

@megahirt
Copy link
Collaborator

megahirt commented Jun 20, 2023 via email

@myieye
Copy link
Collaborator Author

myieye commented Jun 20, 2023

This PR made my day. Thanks Tim!

@megahirt Well that just made my day 🙂. Thanks, Chris!!

@myieye myieye merged commit ddda330 into develop Jun 20, 2023
@myieye myieye deleted the bug/1759-bug-project-activity-on-dashboard-sometimes-triggers-internal-error branch June 20, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing problem with our app in production
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Project activity on dashboard sometimes triggers: Internal Error
2 participants