[Rt-commit] rt branch 5.0/bulk-update-default-cf-value created. rt-5.0.1-609-ge4a768e52a

BPS Git Server git at git.bestpractical.com
Thu Aug 26 14:44:43 UTC 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/bulk-update-default-cf-value has been created
        at  e4a768e52a96099a2f88d94457a92d48e88762b5 (commit)

- Log -----------------------------------------------------------------
commit e4a768e52a96099a2f88d94457a92d48e88762b5
Author: Steven Burr <steve at bestpractical.com>
Date:   Thu Aug 26 09:45:44 2021 -0400

    Deselect custom field values on bulk update
    
    The bulk update page has a section which allows one to edit custom field
    values. Custom fields are rendered as dropdowns with the first
    value preselected. However, if the custom field was setup to have a
    specific default value different than that, submitting an unrelated change
    would populate the CF with that (non-default) first value if the user
    failed to notice and change the dropdown before submission.
    
    The correct behavior should be to render the "add custom field values"
    dropdowns without selecting *any* values by default. This means that the
    custom field will be ignored on a bulk update unless the user opts into
    selecting some value intentionally.

diff --git a/share/html/Elements/BulkCustomFields b/share/html/Elements/BulkCustomFields
index 0a355d2ff3..efea2c0064 100644
--- a/share/html/Elements/BulkCustomFields
+++ b/share/html/Elements/BulkCustomFields
@@ -71,7 +71,8 @@
 % my $cf_id = $cf->id;
 % my @add = (NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => $rows,
 %   MaxValues => $cf->MaxValues, Multiple => ($cf->MaxValues == 1 ? 0 : 1) , Cols => 25,
-%   Default => $ARGS{"Bulk-Add-CustomField-$cf_id-Values"} || $ARGS{"Bulk-Add-CustomField-$cf_id-Value"}, );
+%   Default => $ARGS{"Bulk-Add-CustomField-$cf_id-Values"} || $ARGS{"Bulk-Add-CustomField-$cf_id-Value"},
+%   ShowEmptyOption => 1 );
 % my @del = (NamePrefix => 'Bulk-Delete-CustomField-', CustomField => $cf,
 %   MaxValues => 0, Rows => $rows, Multiple => 1, Cols => 25,
 %   Default => $ARGS{"Bulk-Delete-CustomField-$cf_id-Values"} || $ARGS{"Bulk-Delete-CustomField-$cf_id-Value"}, );

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list