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

As User - I want to set custom attributes on the entity field level #5990

Closed
GreenMachine01 opened this issue May 14, 2023 · 1 comment · Fixed by #6068
Closed

As User - I want to set custom attributes on the entity field level #5990

GreenMachine01 opened this issue May 14, 2023 · 1 comment · Fixed by #6068
Assignees
Labels
epic: DB schema impact: Value Proposition initiatives that focus on improving the value that users are getting from the service
Milestone

Comments

@GreenMachine01
Copy link
Contributor

GreenMachine01 commented May 14, 2023

As a user, I want to set custom attributes on the entity field level in Amplication, so that I can tailor the fields of my entities to my specific needs and workflows.

Example:
image

Prisma Attributes and Functions:
https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#attributes
https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-attributes
https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#using-functions

Requirements:

  1. Custom Attributes on Field Level: Users should be able to set custom attributes for individual fields within an entity. These attributes could include details like format, default values, or specific validation rules. The system should validate these field-level custom attributes to ensure data integrity.

  2. UI for Managing Field-Level Custom Attributes: A user-friendly UI should be provided for managing these field-level custom attributes. The UI should enable users to add, remove, and modify custom attributes at the field level. It should provide feedback on the validity of the attributes and any constraints that must be met. The UI should also display a summary of the custom attributes set for each field within an entity.

  3. Persistence of Field-Level Custom Attributes: All field-level custom attributes should be saved and persisted across sessions. The system should maintain the association between the custom attributes and their respective fields, even when these fields are modified within an entity.

  4. Documentation and Support for Field-Level Custom Attributes: Clear and concise documentation should be provided to guide users on how to use this feature. The documentation should include details on the types of custom attributes that can be set at the field level, how to manage them via the UI, and any constraints or rules related to the custom attributes. Additionally, there should be in-app help or tooltips to guide users while using this feature.

@abrl91
Copy link
Contributor

abrl91 commented May 24, 2023

passed QA ✅

example on Customer entity:

  • model attributes:

Image

  • field attributes:

Image

and the results:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic: DB schema impact: Value Proposition initiatives that focus on improving the value that users are getting from the service
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants