[freeside-commits] branch master updated. eb11834cb545a83c1fddf8febcf309153a707f06

Ivan Kohler ivan at freeside.biz
Mon May 23 19:45:15 PDT 2022


The branch, master has been updated
       via  eb11834cb545a83c1fddf8febcf309153a707f06 (commit)
      from  d0c81067b91fa6c790f848fb4633886d8eb7618d (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 eb11834cb545a83c1fddf8febcf309153a707f06
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon May 23 19:45:14 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