-
-
Notifications
You must be signed in to change notification settings - Fork 278
feature: add bulk update #3695
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
base: main
Are you sure you want to change the base?
feature: add bulk update #3695
Conversation
Code Climate has analyzed commit 9ae1366 and detected 2 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
This PR has been marked as stale because there was no activity for the past 15 days. |
if is_edit? && Avo.configuration.resource_default_view.show? # via resource show or edit page | ||
return helpers.resource_path(record: @resource.record, resource: @resource, **keep_referrer_params) | ||
end | ||
return resource_show_path if returning_to_editable_show? |
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.
Avoid too many return
statements within this method.
@Paul-Bob I’ve tested this task and it works correctly on the backend. Now we just need to take care of the frontend part. Do you have any suggestions ? |
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.
Hi @Nevelito,
Thanks for the great work! 🙌
I did some manual testing, and the controller already seem to be working as expected.
I'll perform a more detailed review of the controllers later.
In the meantime, I have a few questions about parts of the current implementation. Let's continue the discussion within the individual review comments.
Thanks again for your patience and collaboration!
<% if @prefilled_fields.present? %> | ||
<% @prefilled_fields.each do |field, value| %> | ||
<%= hidden_field_tag "prefilled[#{field}]", value %> | ||
<% end %> | ||
<% 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.
Why do we need this?
I imagined that each field would return the correct value when pre-filed
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.
we use it to compare data, the case is that progress bar can not be null, it will automaticlly appear at 50%, so to avoid problems we have to double check if it was moved or delete it from the bulk update
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.
btw during todays tasting I saw that tere is problems with stage in Projects model but it seems easy to solve, but I will solve it after weekend
@@ -71,13 +97,19 @@ def is_edit? | |||
end | |||
|
|||
def form_method | |||
return :put if is_edit? | |||
return :put if is_edit? && params[:controller] != "avo/bulk_update" |
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 think we should use the put as well for bulk updates, any argument why we should use post?
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.
you can test it, when it is using put there are problems and records will not update. the case is that it have to update min. two records
Description
Add bulk update to app
Changes:
Fixes # (issue)
#3679
Checklist:
Screenshots & recording
Screencast.from.12.03.2025.20.44.54.webm