-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[#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
[#64619] Add form configuration tab for work package types #19319
Conversation
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
9ef83ad
to
ff554af
Compare
There was a problem hiding this 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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
def assign_tab | ||
params[:tab] = "form_configuration" unless params[:tab] | ||
end |
There was a problem hiding this comment.
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. ;)
There was a problem hiding this comment.
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 😄
.select { CustomField.custom_field_attribute? it } | ||
.map { it.gsub(/^custom_field_/, "").to_i } |
There was a problem hiding this comment.
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
?
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