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

add orderby name and lastModifiedDateTime #3201

Merged
merged 9 commits into from
Feb 21, 2022
Merged

add orderby name and lastModifiedDateTime #3201

merged 9 commits into from
Feb 21, 2022

Conversation

micbar
Copy link
Contributor

@micbar micbar commented Feb 18, 2022

Description

Implements orderby name and lastModifiedDateTime

Related Issue

How Has This Been Tested?

  • manually

Examples:

lastModifiedDateTime

curl -L -X GET "https://localhost:9200/graph/v1.0/me/drives/?$orderby=lastModifiedDateTime desc" \
-H "Authorization: Basic YWRtaW46YWRtaW4="

Name

curl -L -X GET "https://localhost:9200/graph/v1.0/me/drives/?$orderby=name asc" \
-H "Authorization: Basic YWRtaW46YWRtaW4="

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@micbar micbar requested a review from kobergj February 21, 2022 11:29
@micbar micbar marked this pull request as ready for review February 21, 2022 11:29
@micbar micbar added the Status:Needs-Review Needs review from a maintainer label Feb 21, 2022
graph/pkg/service/v0/drives.go Outdated Show resolved Hide resolved
graph/pkg/service/v0/drives.go Show resolved Hide resolved
graph/pkg/service/v0/drives.go Outdated Show resolved Hide resolved
graph/pkg/service/v0/ordering.go Outdated Show resolved Hide resolved
graph/pkg/service/v0/ordering.go Outdated Show resolved Hide resolved
graph/pkg/service/v0/drives_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@kobergj kobergj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@sonarcloud
Copy link

sonarcloud bot commented Feb 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.3% 0.3% Duplication

@micbar micbar merged commit 90a15a8 into master Feb 21, 2022
@delete-merged-branch delete-merged-branch bot deleted the add-sort branch February 21, 2022 14:59
ownclouders pushed a commit that referenced this pull request Feb 21, 2022
Author: Michael Barz <mbarz@owncloud.com>
Date:   Mon Feb 21 15:59:35 2022 +0100

    add orderby name and lastModifiedDateTime (#3201)

    * add orderby name and lastModifiedDateTime

    * add unit test for sort

    * fix orderby name

    * add more tests

    * exclude test files from duplication analyzer

    * remove flaky test

    * order by name if no date is set

    * refactor

    * add test for wrong parameter name
@micbar micbar mentioned this pull request Mar 3, 2022
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Needs-Review Needs review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable ordering for meDrivesApi listMyDrives endpoint
2 participants