-
-
Notifications
You must be signed in to change notification settings - Fork 279
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 an Organization entity type with a Farm bundle #849
base: 3.x
Are you sure you want to change the base?
Conversation
modules/core/ui/views/config/optional/views.view.farm_organization.yml
Outdated
Show resolved
Hide resolved
modules/core/ui/views/config/optional/views.view.farm_organization.yml
Outdated
Show resolved
Hide resolved
Added a few commits in my branch: https://github.com/paul121/farmOS/tree/3.x-organization |
Because the There's a good amount of logic in our I think the alternative is hard-coding some of this for only the |
17b8888
to
14c896d
Compare
Thanks @paul121 - these look great! I merged them into the PR. I added an additional commit to remove roles from Views |
@paul121 and I just discussed in chat and agreed that This avoids the current issue with bundle fields not allowing writes via the API: https://www.drupal.org/project/farm/issues/3314741 However, this means that the |
7eda625
to
27fb452
Compare
Pushed a commit that adds |
This was cloned directly from the asset module, with no other modifications, using the following commands: cp -r modules/core/asset/ modules/core/organization find modules/core/organization -depth -exec rename 's/asset/organization/g' {} \; find modules/core/organization -depth -exec rename 's/Asset/Organization/g' {} \; find modules/core/organization -type f -exec sed -i 's/asset/organization/g' {} + find modules/core/organization -type f -exec sed -i 's/Asset/Organization/g' {} +
- Use statements should be sorted alphabetically - Line exceeds 80 characters
This was copied from the asset module, which required a migration path from Drupal 7. The new organization entities did not exist on Drupal 7 so they don't need a migration path.
These are remnants of the farmOS v2 branch.
… core revisions tab.
cb8458d
to
49bc203
Compare
For discussion see: https://farmos.discourse.group/t/organization-level-data/2003
This adds a new "Organization" (
organization
) entity type to farmOS for storing organization-level data. Organization entities have the following base-fields (similar toplan
entities, with an additionaluser
field):The "Users" (
user
) field allows users a group to reference one or more user accounts that are associated with it. This does not serve any purpose other than informational at this point, but could be used in the future for building additional UX and/or access control features on top of.An initial "Farm" (
farm
) bundle of the Organization entity is provided as a way of representing "farm organizations". Farm organizations do not have any bundle-specific fields on them at this point, but new ones could be considered in the future. Contrib modules will also be able to add their own for specific purposes.A
farm
organization reference base field is added to all assets for associating them with afarm
organization entity.This is still just a draft to get things started. The initial data architecture is ready for review, and some minimal UI elements are added. More UI/UX is needed to make this usable from the frontend. Potential next steps (for this PR):
We are also discussing adding a
telephone
andaddress
field toorganization
entities (or justfarm
bundles). That is not done yet in this PR (pending community feedback in the forum discussion linked above).