Skip to content

Custom fields for users - re-targeted against v8#16100

Draft
uberbrady wants to merge 2506 commits intogrokability:v8from
uberbrady:custom_fields_for_users_v8
Draft

Custom fields for users - re-targeted against v8#16100
uberbrady wants to merge 2506 commits intogrokability:v8from
uberbrady:custom_fields_for_users_v8

Conversation

@uberbrady
Copy link
Member

This is similar to #13715 - just re-based against the new v8 branch.

This PR has been rebased many, many, many times - so I would expect that it might have acquired some bit-rot during the process.

@what-the-diff
Copy link

what-the-diff bot commented Jan 20, 2025

PR Summary

  • Introduction of Helper Methods for Custom Fields

    • Added new CustomFieldHelper.php file containing methods for handling different operations related to custom fields. This results in a streamlined data handling process.
  • Refactoring of Various Controllers

    • Updated the logic of retrieving, storing, and managing custom fields in AssetsController.php, CustomFieldsetsController.php, UsersController.php and AssetsModelsController.php to further optimize the overall performance.
  • Enhancements of Custom Field Management

    • Introduced changes in CustomFieldsController.php for better management of custom fields, ensuring the right context for fieldset associations.
  • Code Clean-ups

    • Outdated codes and obsolete methods related to default values for custom fields were removed from AssetsController.php and AssetModel.php. This leads to a cleaner, more maintainable codebase and paves the way for new features.
  • Modifications in Data Transformation Logic

    • Changed the logic of transforming custom fields in AssetsTransformer.php and UsersTransformer.php to make use of CustomFieldHelper, achieving more efficient handling of transformation processes.
  • Improvement in Importing Logic

    • Cleaned up the custom field handling logic for asset imports in AssetImporter.php and filled custom fields method in Importer.php for easier understanding and potential improvements.
  • Introduction of New Model, Trait, and Migration Files

    • The addition of DefaultValuesForCustomFields model, HasCustomFields trait, and a few migration files that enable new features and capabilities on managing custom fields more effectively in various models like Asset, AssetModel, and User.
  • Changes in the Presentation Layer

    • Updated AssetPresenter and UserPresenter to directly use CustomFieldHelper, resulting in a more efficient data table layout creation process.
  • Creation of New View Files

    • A new view file custom-fields-view.blade.php was created for better handling of how custom fields are displayed, increasing user interface consistency.
  • Updates in Existing View Files

    • Changes in multiple view files like edit.blade.php and index.blade.php were made necessary for conditional rendering and improved handling of custom fields.
  • Addition of New Unit Test Files

    • Introduced a new unit test file HasCustomFieldsTraitTest.php to test various aspects of custom fields for the Asset model, leading to more reliable software.

snipe added 21 commits August 10, 2025 18:11
Signed-off-by: snipe <snipe@snipe.net>
…-asset-model-images-not-loading

Fixed grokability#17547: asset model images not loading
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
…-use-numeric-for-purchase-cost

Fixed grokability#17490: use numeric for purchase cost
…-add-ldap-sync-via-api

Adds grokability#13997 - API endpoint to sync users via LDAP
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
…ds-paths-to-base-controller

Move the object type mapping and such to the base controller to de-dupe
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
…vements

Mail log for grokability#17491 and some improvements on log errors
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
…-#17565-standard-layout

Show all icons on location table, even if no results
snipe and others added 23 commits September 1, 2025 13:58
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
…-add-withtrashed-to-files

Fixed grokability#17780 - Added `withTrashed()` to allow viewing files on deleted objects
…-remember-checkout-to-type

Fixed grokability#10107 - remember checkout to type
Signed-off-by: snipe <snipe@snipe.net>
…n-location-print

Fixed company name reference in location print
…string-in-notifications

Fixes grokability#17759 translation used in asset check in/out notifications
…instead-of-soft-deleting-the-log-itself

Fixed grokability#17777 - Log upload deletion
Signed-off-by: snipe <snipe@snipe.net>
…al-to-models

Adds require serial as Asset Model option
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
…-larger-currency-field

Fixed grokability#17791 - increase size of purchase cost field
Signed-off-by: snipe <snipe@snipe.net>
…-adds-require-serial-to-importer

Fixed grokability#17798 - added `require_serial` to model importer
@snipe
Copy link
Member

snipe commented Sep 3, 2025

@uberbrady I know you have a lot on your plate right now, but can you look into those failing tests and the conflict? I'd still love to ship this at some point.

marcusmoore and others added 5 commits September 3, 2025 10:13
# Conflicts:
#	app/Models/License.php
#	resources/views/licenses/view.blade.php
#	tests/Feature/Checkins/Api/LicenseCheckInTest.php
…on-logs

Upload log file in GitHub Action tests
…signable_license

Allows check-ins of unreassignable licenses
@snipe snipe marked this pull request as draft September 8, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.