<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
  <title>aC forum: Preventing copying of time on milestone copy?</title>
  <link>http://www.activecollab.com/forums/topic/6387/</link>
  <description>Recent posts on topic: Preventing copying of time on milestone copy?</description>
  <dc:language>en-us</dc:language>
  <pubDate>Thu, 24 May 2012 09:31:53 CDT</pubDate>
  
  <item>
    <link>http://www.activecollab.com/forums/post/27680/#post27680</link>
    <guid>http://www.activecollab.com/forums/post/27680/#post27680</guid>
    <title>Post #3 by Chris B. </title>
    <dc:creator>Chris B. </dc:creator>
    <description><![CDATA[<p>Ilija Studen,<br />
<br />
Thanks for the answer. I was able to find where it happens, but I don't understand why items are copied using the ProjectObject's copy function whereas subitems are copied via direct database manipulation. Is this for compatibility with third-party modules..?<br />
<br />
Anyway, for anyone else looking for this solution, this is what I did: In<br />
<pre name="code" class="brush: php">activecollab/application/modules/resources/handlers/on_project_object_copied.php</pre><br />
I found:<br />
<pre name="code" class="brush: php">foreach($rows as $row) {</pre><br />
and right after that line added:<br />
<pre name="code" class="brush: php">if (strtolower($row['type']) == 'timerecord') continue;</pre><br />
which did the trick.<br />
<br />
- Chris</p>]]></description>
    <pubDate>Thu, 02 Sep 2010 08:43:20 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/27666/#post27666</link>
    <guid>http://www.activecollab.com/forums/post/27666/#post27666</guid>
    <title>Post #2 by Ilija Studen</title>
    <dc:creator>Ilija Studen</dc:creator>
    <description><![CDATA[<p>Hello,<br />
<br />
activeCollab cascades copy for subitems - tasks, comments etc. Check on_project_object_copied even handler of resources module to see where subitems are being copied.</p>]]></description>
    <pubDate>Wed, 01 Sep 2010 16:55:01 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/27663/#post27663</link>
    <guid>http://www.activecollab.com/forums/post/27663/#post27663</guid>
    <title>Post #1 by Chris B. </title>
    <dc:creator>Chris B. </dc:creator>
    <description><![CDATA[<p>I've been banging my head against the desk trying to figure out how and when this occurs. We love the fact that milestone copies can now have their subitems copied as well, but we don't want the time to be included!<br />
What I really don't understand is even though there seems to be this nice hierarchy followed to copy every object... task and time objects are not instantiated during this string of events, yet get copied.<br />
I'm stumped.<br />
I've tried doing something as simple as adding echo statements to copy() (ProjectObject class) and to on_object_inserted (oops.. that was for checklists, but it gets every event regardless, doesn't it?), and all I get for output looks like this:<br />
<br />
---copy new Milestone---<br />
inserted: Milestone<br />
inserted: Subscription<br />
---copy new Checklist---<br />
inserted: Checklist<br />
---copy new Discussion---<br />
inserted: Discussion<br />
inserted: Subscription<br />
---copy new File---<br />
inserted: File<br />
inserted: Subscription<br />
---copy new Ticket---<br />
inserted: Ticket<br />
inserted: Subscription<br />
inserted: Subscription<br />
inserted: Subscription<br />
inserted: Subscription<br />
---copy new Ticket---<br />
inserted: Ticket<br />
inserted: Subscription<br />
<br />
.. in other words, no tasks, no time, so ... how do I stop time from being copied?</p>]]></description>
    <pubDate>Wed, 01 Sep 2010 16:43:44 CDT</pubDate>
  </item>
</channel>
</rss>
