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

Rewrite share expiration date field's date handling, fixing issues #5961

Merged
merged 26 commits into from
Sep 13, 2023

Conversation

claucambra
Copy link
Collaborator

@claucambra claucambra commented Aug 8, 2023

Rather than deal with messy dates and times (and timezones) using JS dates in QML, this PR moves the inner workings of the date input field into a C++ class using QDates, fixing lots of issues on this front.

Fixes #5627
Fixes #5495

@claucambra claucambra self-assigned this Aug 8, 2023
@claucambra claucambra linked an issue Aug 8, 2023 that may be closed by this pull request
9 tasks
@claucambra claucambra changed the title Rewrite share expiration date field's date handling Rewrite share expiration date field's date handling, fixing issues Aug 8, 2023
@claucambra
Copy link
Collaborator Author

/backport to stable-3.9

@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #5961 (c01b669) into master (2dc3af2) will decrease coverage by 0.04%.
The diff coverage is n/a.

❗ Current head c01b669 differs from pull request most recent head 774918c. Consider uploading reports for the commit 774918c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5961      +/-   ##
==========================================
- Coverage   60.14%   60.11%   -0.04%     
==========================================
  Files         145      145              
  Lines       18872    18872              
==========================================
- Hits        11351    11344       -7     
- Misses       7521     7528       +7     

see 2 files with indirect coverage changes

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 8, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.14.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@claucambra
Copy link
Collaborator Author

/backport to stable-3.10

Copy link
Collaborator

@mgallien mgallien left a comment

Choose a reason for hiding this comment

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

we need automated tests for DateFieldBackend otherwise, it is complicated to predict the behavior

src/gui/filedetails/NCInputDateField.qml Outdated Show resolved Hide resolved
@claucambra claucambra requested a review from mgallien September 12, 2023 17:01
@claucambra
Copy link
Collaborator Author

we need automated tests for DateFieldBackend otherwise, it is complicated to predict the behavior

Added automated tests now

@claucambra claucambra force-pushed the work/share-expire-date-ui branch 2 times, most recently from f3ef369 to c01b669 Compare September 13, 2023 02:43
@mgallien mgallien enabled auto-merge September 13, 2023 08:15
…rsing two-digit year strings

Signed-off-by: Claudio Cambra <[email protected]>
@mgallien mgallien force-pushed the work/share-expire-date-ui branch from c01b669 to 774918c Compare September 13, 2023 08:15
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5961-774918c5d124f0fa6c6f3b3a3c26f4d9892cdb93-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

86.4% 86.4% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@mgallien mgallien merged commit 51bb960 into master Sep 13, 2023
9 of 10 checks passed
@mgallien mgallien deleted the work/share-expire-date-ui branch September 13, 2023 08:44
@claucambra
Copy link
Collaborator Author

/backport to stable-3.10

@backportbot-nextcloud
Copy link

The backport to stable-3.10 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable-3.10
git pull origin stable-3.10

# Create the new backport branch
git checkout -b fix/foo-stable-3.10

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable-3.10

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@krwi
Copy link

krwi commented Sep 13, 2023

Thank you so much, @claucambra and @mgallien! ❤️

@mgallien mgallien added this to the 3.11.0 milestone Sep 16, 2023
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.

[Bug]: Error setting release date [Bug]: set share link expiration date (comes random date)
4 participants