[freeside-commits] branch FREESIDE_4_BRANCH updated. 7e5fce86f887975d57029e28511100e511d1bdb9
Ivan Kohler
ivan at freeside.biz
Mon May 23 19:45:18 PDT 2022
The branch, FREESIDE_4_BRANCH has been updated
via 7e5fce86f887975d57029e28511100e511d1bdb9 (commit)
from 96c44f6506691ce5d4f7d8d29d5ced70f217cec3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7e5fce86f887975d57029e28511100e511d1bdb9
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon May 23 19:45:17 2022 -0700
bulk remove package def options, RT#86028
diff --git a/bin/part_pkg-bulk_change b/bin/part_pkg-bulk_change
index 5347da6be..582ab39c2 100755
--- a/bin/part_pkg-bulk_change
+++ b/bin/part_pkg-bulk_change
@@ -39,6 +39,12 @@ foreach my $part_pkg ( qsearch({ 'table' => 'part_pkg',
my $part_pkg_option = qsearchs('part_pkg_option', \%hash);
+ unless ( defined $opt_v ) {
+ my $error = $part_pkg_option && $part_pkg_option->delete;
+ die $error if $error;
+ next;
+ }
+
if ( $part_pkg_option ) {
next if $part_pkg_option->optionvalue eq $opt_v;
$part_pkg_option->optionvalue($opt_v);
@@ -130,7 +136,7 @@ Search options:
Change options:
--o: part_pkg_option optionname
+-o: part_pkg_option optionname (use without -v to unset)
-v: part_pkg_option optionvalue
-----------------------------------------------------------------------
Summary of changes:
bin/part_pkg-bulk_change | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list