[rt-users] Assigning HeldBy users during Asset Import
Mitch Kyser
mkyser at albion.edu
Wed Sep 17 14:27:57 EDT 2014
Hi Kevin
Thanks for the response. I took a look at
/opt/rt4/local/plugins/RT-Extension-Assets-Import-CSV/lib/RT/Extension/Assets/Import/
CSV.PM and removed the check you suggested by commenting out lines 64 thru
67;
#if ( not RT::Asset->Role($fieldname)->{Single}) {
# RT->Logger->warning( "Role name $fieldname must be single-value for
"._column($field2csv->{$fieldname}).", skipping");
# delete $field2csv->{$fieldname};
#}
Instead of the single warning I got one for each asset I tried to update
that had a username to be placed in the HeldBy field;
[error]: Failed to set HeldBy to mkyser for row 5408: No valid Type
specified
(/opt/rt4/local/plugins/RT-Extension-Assets-Import-CSV/lib/RT/Extension/Assets/Import/CSV.pm:178)
When I tried using 'Owner' instead of 'HeldBy' I got the same results.
I will see what it takes to submit a bug report like you suggested, then
submit one.
I am seeing similar things when I try to use the Bulk Update feature with
HeldBy, no error message but no change in HeldBy either.
Thanks again.
Mitch
On Wed, Sep 17, 2014 at 11:44 AM, Kevin Falcone <falcone at bestpractical.com>
wrote:
> On Fri, Sep 12, 2014 at 10:15:19AM -0700, mkyser wrote:
> > 'Role name HeldBy must be single-value for column Username, skipping'
>
> For no particular reason, the code requires that you assign to a
> single-value Role and disallows roles that could contain multiple
> people.
>
> In the case of Assets, this means you could set Owner, but not Held
> By. This seems like an oversight. You can probably safely delete
> that check from CSV.pm and try importing, but it'll only allow a
> single Held By user to be added. We'd need to define a convention for
> having multiple people in that single column, possibly doing it by
> email address which is easily parseable with tools, but right now that
> column only goes by username (or user id).
>
> Try tweaking the code and definitely file a bug about this because it
> feels like an accidental oversight.
>
> -kevin
>
> --
> RT Training - Boston, September 9-10
> http://bestpractical.com/training
>
--
Mitch Kyser
Network Administrator
Albion.College
mkyser at albion.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140917/da76174e/attachment.htm>
More information about the rt-users
mailing list