-
Notifications
You must be signed in to change notification settings - Fork 1
Initial release #1
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…so I can eventually create a 2GP for this repo
…l production installs' Thanks to @jamessimone for the great suggestion!
… meaningful/don't reflect the audit info of the actual package data
…me, add 'Total Versions' rollup field on Package__c
…version's PackageVersionNumber__c field value
…the SObjects MetataPackage, MetadataPackageVersion, and PackageSubscriber. Also switched to using Database.DmlOptions instead of the truncateFieldValue() method Thanks to @jamessimone for the fantastic suggestion on handling the SObjects - this is much cleaner than all of the stupid strings I was using previously Really beauty is on the inside - and before this change, the PackageExtractJob was very ugly Could it still be better? Probably. Is everything working? Hopefully - well enough to create a package version with code coverage.
…lame usage of Schema.getGlobalDescribe() (thanks again to @jamessimone!)
…sn't that useful. I might re-add it later
…KAGING_ORG, added project header in Apex classes
- Added overload for scheduleHourly() to control if the job also executes immediately - Added private method executeBatch() to eliminate some code duplication - Moved DMLOptions to a constant. Previously, it was being recreated for every SObject record
…now automatically done via the method scheduleHourly()
…ants & swapping out switch statements for if-else statements
jamessimone
reviewed
Feb 4, 2022
jamessimone
reviewed
Feb 4, 2022
jamessimone
reviewed
Feb 4, 2022
package-analytics/main/default/classes/PackageDataExtractJob.cls
Outdated
Show resolved
Hide resolved
jamessimone
approved these changes
Feb 4, 2022
Collaborator
jamessimone
left a comment
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.
Some minor comments but otherwise LGTM!
…sed on some stellar feedback from @jamessimone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This initial release is focused on extracting data from non-reportable objects
MetadataPackage,MetadataPackageVersion, andPackageSubscriber, and storing the data in 3 custom objects:Package__c,PackageVersion__c, andPackageSubscriberOrg__c. This unlocked package release includes:PackageDataExtractJob. This job has been designed so it can be deployed to sandboxes/scratch orgs, although it will only function properly in a dev hub/packaging orgPackageAnalyticsAdmin- provides full read/write/edit/delete access for the included custom objectsPackageAnalyticsViewer- provides read-only access for the included custom objectsScreenshots:
Packages tab, displayed inside of the include console app Package Analytics
Package details page (
Package__c), displaying a related list of Package Versions (PackageVersion__c)Package Version details page (
PackageVersion__c), displaying a related list of Package Subscriber Orgs (PackageSubscriberOrg__c)