-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Adds #366 sorting contact list by last activity date #775
Conversation
Pull from Main
Add webmanifest (monicahq#726)
Change to git clone URL as the git@ will not work without a granted private key.
…icahq#731) When the current day of the month is greater than the number of days in the month, the date class was rolling forward to March.
…ahq#735) This will allow a user to search there contacts by there contact information. It is done by entering the field they are searching by followed by a : then the search term. For example to find a contact with the email example@example.com you would enter email:example@example.com. Fixes monicahq#729
Merge Upstream
Revert "Fix URL::forceSchema to forceScheme (monicahq#730)" (monicahq#744)
Merge Remote
@@ -74,6 +82,18 @@ public function index(Request $request) | |||
$contacts = $user->account->contacts()->real()->sortedBy($sort)->get(); | |||
} | |||
|
|||
if ($date_flag) { | |||
foreach ($contacts as $contact) { | |||
$contact['sort_date'] = $contact->getLastActivityDate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@djaiss Please advise on how you would like me to address the sonarqube issues. I disagree with the minor one. But with the major one I am not sure on the best approach to refactor. |
@turtles2 yeah this bot is a test right now. I strongly believe it can help us tremendously but it definitely needs tuning :-D |
I figured as much. @djaiss Were do we stand with the PR would you like me to attempt to simplify index by breaking it up a bit or do think we are good to merge it in? Looking at the function I think that breaking it up would make it slightly harder to keep track of the different sorting and tag features. But I am open to breaking it up. |
SonarQube analysis reported 2 issues Watch the comments in this conversation to review them. 1 extra issueNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
Close #366 |
This pull request has been automatically locked since there |
This will fix #366. It allows sorting by Oldest or Newest. Currently being null makes it the oldest value. I believe that this is the proper approach if not we can can change it.