X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fhtml%2FREST%2F1.0%2FForms%2Fqueue%2Fns;fp=rt%2Fhtml%2FREST%2F1.0%2FForms%2Fqueue%2Fns;h=360eea86b8f5bb297f3db293a27935b3138f5b2d;hb=289340780927b5bac2c7604d7317c3063c6dd8cc;hp=0000000000000000000000000000000000000000;hpb=945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd;p=freeside.git diff --git a/rt/html/REST/1.0/Forms/queue/ns b/rt/html/REST/1.0/Forms/queue/ns new file mode 100644 index 000000000..360eea86b --- /dev/null +++ b/rt/html/REST/1.0/Forms/queue/ns @@ -0,0 +1,38 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +%# REST/1.0/Forms/queue/ns +%# +<%ARGS> +$id + +<%perl> +use RT::Queues; + +my $queues = new RT::Queues $session{CurrentUser}; +$queues->Limit(FIELD => 'Name', OPERATOR => '=', VALUE => $id); +if ($queues->Count == 0) { + return (0, "No queue named $id exists."); +} +return $queues->Next->Id; +