[Bps-public-commit] rt-extension-rest2 branch, update-custom-roles-on-correspond-and-comment, repushed
Dianne Skoll
dianne at bestpractical.com
Fri Jan 15 14:19:18 EST 2021
The branch update-custom-roles-on-correspond-and-comment was deleted and repushed:
was dafe87a413680fc576a35cd3bf56b950c72c4484
now 3fa8e151b05ceac516c23d33d834ad0e1e9666e2
1: 188a4b4 ! 1: e6c06b1 Move update_role_members Util.pm; implement fix_custom_role_ids
@@ -1,32 +1,6 @@
Author: Dianne Skoll <dianne at bestpractical.com>
- Move _update_role_members and _fix_custom_role_ids into Util.pm
-
- This will allow them to be re-used in other places such as a ticket update.
-
-diff --git a/lib/RT/Extension/REST2/Resource/Message.pm b/lib/RT/Extension/REST2/Resource/Message.pm
---- a/lib/RT/Extension/REST2/Resource/Message.pm
-+++ b/lib/RT/Extension/REST2/Resource/Message.pm
-@@
- use MIME::Base64;
-
- extends 'RT::Extension::REST2::Resource';
-+
- use RT::Extension::REST2::Util qw( error_as_json update_custom_fields );
-
- sub dispatch_rules {
-@@
-
- push @results, $msg;
- push @results, update_custom_fields($self->record, $args{CustomFields});
-- push @results, $self->_update_txn_custom_fields( $TransObj, $args{TxnCustomFields} || $args{TransactionCustomFields} );
-+ # update_role_members wants custom role IDs (like RT::CustomRole-ID)
-+ # rather than role names.
-+ my $renamed_custom_roles = fix_custom_role_ids($self->record, $args{CustomRoles});
-+ push @results, update_role_members($self->record, $renamed_custom_roles);
-
- # Set ticket status if we were passed a "Status":"foo" argument
- if ($args{Status}) {
+ Move update_role_members Util.pm; implement fix_custom_role_ids
diff --git a/lib/RT/Extension/REST2/Resource/Record/Writable.pm b/lib/RT/Extension/REST2/Resource/Record/Writable.pm
--- a/lib/RT/Extension/REST2/Resource/Record/Writable.pm
2: ebfafbf ! 2: 4350694 Allow updating of custom roles on ticket comment/correspond
@@ -1,6 +1,6 @@
Author: Dianne Skoll <dianne at bestpractical.com>
- Allow updating of custom roles on ticket comment/correspond.
+ Allow updating of custom roles on ticket comment/correspond
diff --git a/lib/RT/Extension/REST2/Resource/Message.pm b/lib/RT/Extension/REST2/Resource/Message.pm
--- a/lib/RT/Extension/REST2/Resource/Message.pm
@@ -9,7 +9,6 @@
use MIME::Base64;
extends 'RT::Extension::REST2::Resource';
--
-use RT::Extension::REST2::Util qw( error_as_json update_custom_fields );
+use RT::Extension::REST2::Util qw( error_as_json update_custom_fields update_role_members fix_custom_role_ids);
@@ -20,12 +19,11 @@
push @results, $msg;
push @results, update_custom_fields($self->record, $args{CustomFields});
+
- # update_role_members wants custom role IDs (like RT::CustomRole-ID)
- # rather than role names.
- my $renamed_custom_roles = fix_custom_role_ids($self->record, $args{CustomRoles});
- push @results, update_role_members($self->record, $renamed_custom_roles);
-+ push @results, $self->_update_txn_custom_fields( $TransObj, $args{TxnCustomFields} || $args{TransactionCustomFields} );
++ # update_role_members wants custom role IDs (like RT::CustomRole-ID)
++ # rather than role names.
++ my $renamed_custom_roles = fix_custom_role_ids($self->record, $args{CustomRoles});
++ push @results, update_role_members($self->record, $renamed_custom_roles);
+ push @results, $self->_update_txn_custom_fields( $TransObj, $args{TxnCustomFields} || $args{TransactionCustomFields} );
# Set ticket status if we were passed a "Status":"foo" argument
- if ($args{Status}) {
3: 59219eb ! 3: 287a7c8 Document CustomFields, TxnCustomFields and CustomRoles data members
@@ -1,6 +1,6 @@
Author: Dianne Skoll <dianne at bestpractical.com>
- Document CustomFields, TxnCustomFields and CustomRoles data members.
+ Document CustomFields, TxnCustomFields and CustomRoles data members
diff --git a/lib/RT/Extension/REST2.pm b/lib/RT/Extension/REST2.pm
--- a/lib/RT/Extension/REST2.pm
4: dafe87a ! 4: 3fa8e15 Add unit test for updating custom roles on ticket comment/correspond
@@ -1,6 +1,6 @@
Author: Dianne Skoll <dianne at bestpractical.com>
- Add unit test for updating custom roles on ticket comment/correspond.
+ Add unit test for updating custom roles on ticket comment/correspond
diff --git a/lib/RT/Extension/REST2/Test.pm.in b/lib/RT/Extension/REST2/Test.pm.in
--- a/lib/RT/Extension/REST2/Test.pm.in
@@ -14,10 +14,10 @@
);
return $u;
-diff --git a/xt/ticket-correspond-update-customroles.t b/xt/ticket-correspond-update-customroles.t
+diff --git a/ticket-correspond-update-customroles.t b/ticket-correspond-update-customroles.t
new file mode 100644
--- /dev/null
-+++ b/xt/ticket-correspond-update-customroles.t
++++ b/ticket-correspond-update-customroles.t
@@
+use strict;
+use warnings;
More information about the Bps-public-commit
mailing list