[74931] Show type of field beside the attribute#23205
Open
bsatarnejad wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds field type labels to the work package type form configuration so administrators can see whether an attribute is built-in or which custom field format it uses.
Changes:
- Adds
field_formatmetadata for work package custom fields. - Maps form configuration attributes to a new
field_typelabel. - Renders field type labels on active attribute rows and adds related specs/localization.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
app/models/type/attributes.rb |
Adds custom field format metadata to form attribute definitions. |
app/helpers/types_helper.rb |
Computes field type labels for form configuration attributes. |
app/components/work_package_types/form_configuration/group_attribute_row_component.html.erb |
Displays field type labels beside active attributes. |
config/locales/en.yml |
Adds the built-in field label translation. |
spec/helpers/types_helper_spec.rb |
Covers helper-generated field type labels. |
spec/features/types/form_configuration_spec.rb |
Adds UI coverage for field type labels and a cancel-edit wait assertion. |
Comment on lines
+253
to
+260
| it "shows field type labels beside attributes" do | ||
| # Built-in attributes show "Builtin field" | ||
| builtin_label = I18n.t("types.edit.form_configuration.builtin_field") | ||
| assignee_row = page.find('li[data-attr-key="assignee"]') | ||
| expect(assignee_row).to have_text(builtin_label) | ||
|
|
||
| date_row = page.find('li[data-attr-key="date"]') | ||
| expect(date_row).to have_text(builtin_label) |
myabc
reviewed
May 15, 2026
| end | ||
| if @attribute[:field_type].present? | ||
| left.with_column(ml: 2) do | ||
| render(Primer::Beta::Text.new(color: :muted, font_size: :small)) { @attribute[:field_type] } |
Contributor
There was a problem hiding this comment.
This should be a Primer::Beta::Text, I think.
Contributor
Author
There was a problem hiding this comment.
We already uses Primer::Beta::Text
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
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.
Ticket
https://community.openproject.org/wp/74931
What are you trying to accomplish?
Show field type of each custom field beside it.
I ignore the label for query group, because in our current version it is a separated group.
Screenshots