Re: Renaming a resource?

Jeff <[email protected]> Thu, 12 Nov 2009 12:21:29 -0500
Newsgroups gmane.comp.cms.opengroupware.user
Message-ID <[email protected]>
--0015174c1d0a492dba04782fc79e
Content-Type: text/plain; charset=ISO-8859-1

Finally got around to renaming the resource, and these database queries did
the trick, thanks!

However, the old resource name is still showing up in the calendar view in
the dropdown (where it defaults to my account - but we have the Resources
listed there too).

What table is that stored in so I can update that without having the users
change it manually?   And wherever that table is, does it need an
object_version increment as well?

Thanks!
Jeff

On Tue, Aug 18, 2009 at 12:11 PM, Adam Tauno Williams <
[email protected]> wrote:

> On Tue, 2009-08-18 at 12:58 -0400, Jeff wrote:
> > I see that I can edit a resource, but it doesn't appear that I can
> > edit the name of the resource, only other details such as Email, Email
> > Subject, etc.
> > (I'm looking at the Edit Appointment Resources in the Administration)
> > Is it possible?
>
> It is 'possible' but not I think through the WebUI.  A problem is that
> resources are identified BY NAME in appointments, so if you rename you
> potentially loose the reference [it has always been that way, not sure
> why, it sucks].
>
> It is pretty trivial to change in the database:
>
> SELECT COUNT(*) FROM date_x WHERE resource_names LIKE '%Big Classroom%';
>
> UPDATE appointment_resource
> SET name = 'GRD Classroom'
> WHERE name = 'Big Classroom';
>
> UPDATE date_x
> SET resource_names = REPLACE(resource_names, 'Big Classroom', 'GRD
> Classroom'), object_version = (object_version + 1);
>
> SELECT COUNT(*) FROM date_x WHERE resource_names LIKE '%GRD Classroom%'
>
> --
> OpenGroupware.org Users
> [email protected]
> http://mail.opengroupware.org/mailman/listinfo/users
>

--0015174c1d0a492dba04782fc79e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br>Finally got around to renaming the resource, and these database queries=
 did the trick, thanks!<br><br>However, the old resource name is still show=
ing up in the calendar view in the dropdown (where it defaults to my accoun=
t - but we have the Resources listed there too). <br>

<br>What table is that stored in so I can update that without having the us=
ers change it manually?=A0=A0 And wherever that table is, does it need an o=
bject_version increment as well?<br><br>Thanks!<br>Jeff<br><br><div class=
=3D"gmail_quote">

On Tue, Aug 18, 2009 at 12:11 PM, Adam Tauno Williams <span dir=3D"ltr">&lt=
;<a href=3D"mailto:[email protected]">[email protected]</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"border-left: 1px=
 solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div></div><div class=3D"h5">On Tue, 2009-08-18 at 12:58 -0400, Jeff w=
rote:<br>
&gt; I see that I can edit a resource, but it doesn&#39;t appear that I can=
<br>
&gt; edit the name of the resource, only other details such as Email, Email=
<br>
&gt; Subject, etc.<br>
&gt; (I&#39;m looking at the Edit Appointment Resources in the Administrati=
on)<br>
&gt; Is it possible?<br>
<br>
</div></div>It is &#39;possible&#39; but not I think through the WebUI. =A0=
A problem is that<br>
resources are identified BY NAME in appointments, so if you rename you<br>
potentially loose the reference [it has always been that way, not sure<br>
why, it sucks].<br>
<br>
It is pretty trivial to change in the database:<br>
<br>
SELECT COUNT(*) FROM date_x WHERE resource_names LIKE &#39;%Big Classroom%&=
#39;;<br>
<br>
UPDATE appointment_resource<br>
SET name =3D &#39;GRD Classroom&#39;<br>
WHERE name =3D &#39;Big Classroom&#39;;<br>
<br>
UPDATE date_x<br>
SET resource_names =3D REPLACE(resource_names, &#39;Big Classroom&#39;, &#3=
9;GRD<br>
Classroom&#39;), object_version =3D (object_version + 1);<br>
<br>
SELECT COUNT(*) FROM date_x WHERE resource_names LIKE &#39;%GRD Classroom%&=
#39;<br>
<font color=3D"#888888"><br>
--<br>
OpenGroupware.org Users<br>
<a href=3D"mailto:[email protected]">[email protected]</a><br>
<a href=3D"http://mail.opengroupware.org/mailman/listinfo/users" target=3D"=
_blank">http://mail.opengroupware.org/mailman/listinfo/users</a><br>
</font></blockquote></div><br>

--0015174c1d0a492dba04782fc79e--
-- 
OpenGroupware.org Users
[email protected]
http://mail.opengroupware.org/mailman/listinfo/users