Skip to content

[#64619] Add form configuration tab for work package types #19319

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

shiroginne
Copy link
Contributor

Ticket

64619

What are you trying to accomplish?

In order to fix the current issue with Types, new controllers were introduced to cover every tab of the Type model.

Introduces a new FormConfigurationTabController, view, and routes to allow editing and updating form configuration for work package types.

Updates the attribute groups transformer and update service to handle attribute group parameters correctly.

Merge checklist

  • Added/updated tests
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@shiroginne shiroginne self-assigned this Jun 25, 2025
@shiroginne shiroginne requested review from mereghost and Kharonus and removed request for mereghost June 30, 2025 16:20
@shiroginne shiroginne marked this pull request as ready for review June 30, 2025 16:20
shiroginne added 11 commits July 1, 2025 14:50
Introduces a new `FormConfigurationTabController`, view, and routes to allow editing and updating form configuration for work package types.

Updates the attribute groups transformer and update service to handle attribute group parameters correctly.
Add error message
@shiroginne shiroginne force-pushed the implementation/64619-create-form_configuration_tab_controller branch from 9ef83ad to ff554af Compare July 1, 2025 12:50
Copy link
Member

@Kharonus Kharonus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually only a small hint. But this can easily get extracted to a new PR.

<%= render ::Types::EditPageHeaderComponent.new(type: @type, tabs: types_tabs) %>

<%=
form_for @type,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 did you check if there is any way of embedding that code into a primer form?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added primer form helper (just now), but the form itself - attribute groups, no. That would be my next step and question to the primer team, as this attribute group is used in many places in the application.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kharonus I doubt so. The components are pretty resilient when it comes to injecting random html/partials inside them.

Copy link
Contributor

@mereghost mereghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good. =) Nice work.

Comment on lines +67 to +69
def assign_tab
params[:tab] = "form_configuration" unless params[:tab]
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 My PR #19364 has the update to TabsHelper that would handle the params, just in case you want to remove this. ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's coordinate merge then 😄

Comment on lines 67 to 68
.select { CustomField.custom_field_attribute? it }
.map { it.gsub(/^custom_field_/, "").to_i }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Can this be made into a filter_map?

@shiroginne shiroginne merged commit 893e021 into dev Jul 1, 2025
13 of 14 checks passed
@shiroginne shiroginne deleted the implementation/64619-create-form_configuration_tab_controller branch July 1, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants