-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-25947] Add folders and favorites when sharing a cipher #6402
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
base: main
Are you sure you want to change the base?
Conversation
Claude finished @nick-livefront's task ββ View job Code Review AnalysisI've analyzed this pull request that fixes the issue where folder and favorite attributes were being lost when sharing a cipher from personal vault to organization. Todo List:
Review Findingsπ Positive Aspects
π€ Concerns and Questions
|
New Issues (1)Checkmarx found the following issues in this Pull Request
|
existingCipher.Reprompt = Reprompt; | ||
existingCipher.Key = Key; | ||
existingCipher.ArchivedDate = ArchivedDate; | ||
existingCipher.Folders = userIdKey != null && FolderId != null ? |
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.
server/src/Sql/dbo/Vault/Stored Procedures/Cipher/CipherDetails_Update.sql
Lines 36 to 53 in 4e64d35
[Folders] = | |
CASE | |
WHEN @FolderId IS NOT NULL AND [Folders] IS NULL THEN | |
CONCAT('{', @UserIdKey, ':"', @FolderId, '"', '}') | |
WHEN @FolderId IS NOT NULL THEN | |
JSON_MODIFY([Folders], @UserIdPath, CAST(@FolderId AS VARCHAR(50))) | |
ELSE | |
JSON_MODIFY([Folders], @UserIdPath, NULL) | |
END, | |
[Favorites] = | |
CASE | |
WHEN @Favorite = 1 AND [Favorites] IS NULL THEN | |
CONCAT('{', @UserIdKey, ':true}') | |
WHEN @Favorite = 1 THEN | |
JSON_MODIFY([Favorites], @UserIdPath, CAST(1 AS BIT)) | |
ELSE | |
JSON_MODIFY([Favorites], @UserIdPath, NULL) | |
END, |
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.
That's pretty cool that Claude identified the same thing! Or at least had a hunch
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.
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6402 +/- ##
==========================================
+ Coverage 50.42% 50.58% +0.16%
==========================================
Files 1853 1853
Lines 82394 82166 -228
Branches 7265 7261 -4
==========================================
+ Hits 41550 41567 +17
+ Misses 39260 39013 -247
- Partials 1584 1586 +2 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
β¦s/favorite assignments on a cipher
Claude finished @nick-livefront's task ββ View job PR Review AnalysisI've thoroughly analyzed this pull request and identified significant improvements in the implementation, but there are still critical concerns that need attention. Todo List:
π Excellent ImprovementsThe updated implementation addresses most of the concerns from my previous review:
|
Claude finished @nick-livefront's task ββ View job PR Review AnalysisI've thoroughly analyzed this pull request that addresses sharing ciphers with folder and favorite attributes. The implementation shows significant improvements from previous reviews, but there are still some important considerations. Todo List:
π Excellent ImprovementsThe updated implementation addresses most of the critical concerns from previous reviews:
|
|
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.
π¨ Given that we have a bug that we are squashing (nice work!), what's our team consensus/goal/standards/etc. on writing covering unit test(s) and/or integration tests?
β¦/pm-25957/sharing-cipher-to-org
Claude finished @nick-livefront's task ββ View job PR Code Review AnalysisI've completed a thorough analysis of this pull request that fixes folder and favorite attributes being lost when sharing ciphers from personal vault to organization. Todo List:
π Excellent ImprovementsThis implementation shows significant evolution from previous reviews, with major improvements addressing data integrity concerns:
|
@theMickster Great thought, I agree we should be adding them wherever we can π Appreciate the nudge to do so! |
I'm good with the PR so long as @shane-melton double-checks that his concern was properly addressed. |
ποΈ Tracking
PM-25947
π Objective
When sharing a cipher from a personal vault to an organization the folder and favorite attributes were being lost in the
toCipher
method.πΈ Screenshots
Screen.Recording.2025-09-30.at.3.22.59.PM.mov