Skip to content

Commit

Permalink
Support group for signalling a group as well, make space optional.
Browse files Browse the repository at this point in the history
I noticed that RT inserts "group:$group_name" in the role fields when
creating an asset in the web interface.

However, Download Spreadsheet uses "Group: $group_name" (this is what I
initially selected to support).
  • Loading branch information
puck committed Jul 24, 2022
1 parent dbcd11e commit 621fec2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/RT/Extension/Assets/Import/CSV.pm
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ sub process_roles_field {
my $type = 'user';
my $principal = $user;

if ($name =~ /^Group: (.*)$/) {
if ($name =~ /^[Gg]roup: ?(.*)$/) {
# Add a group.
#
# Lazy create a group for lookups.
Expand Down Expand Up @@ -570,7 +570,7 @@ asset ids. Otherwise, asset id conflicts may occur.
You can add multiple principals to role which support that (HeldBy & Contact)
by separating them with ", ". The space is required as commas are allowed in
usernames within RT. If you have a username with ", " in it, then sorry, you
can add to assets with this tool. To add a group use "Group: Group name"
can add to assets with this tool. To add a group use "group: Group name"
Any users or groups in a role which aren't mentioned in the CSV will be
removed from the asset.
Expand Down

0 comments on commit 621fec2

Please sign in to comment.