Re: [Agilo for Trac] Agilo/Trac Error: "The ticket has been modified by someone else since you started."

226 views
Skip to first unread message

Stefano Rago

unread,
Dec 20, 2012, 3:23:24 AM12/20/12
to ag...@googlegroups.com
Hi,
On Dec 13, 2012, at 10:36 PM, Elaborate Ruse <kapl...@gmail.com> wrote:

> Hello all,
> We had Agilo 1.3.4 with Trac 0.11.4, and recently upgraded to Agilo 1.3.9 with Trac 1.0. Since the upgrade, the first few updates made to tickets for the day experience the error seen in the attached screenshot: "The ticket has been modified by someone else since you started." There are no new modifications, however. More specifically, users come in in the morning, open their browsers, and go to a ticket. They make an update, such as adding a comment, and attempt to save when they experience the error. They press save again and the error may occur one or two more times, but eventually the save goes through. This has happened for about the last four days. After seeing the issue in the morning, they do not see it again for the rest of the day.
>
> We have a number of different non-Agilo projects in this Trac environment, none of which are experiencing this issue. I did find this article regarding the XML-RPC plugin that saw a similar issue due to a change in Trac: http://trac-hacks.org/ticket/9921 . I have disabled all plugins in this environment except AdvancedTicketWorkflow, AccountManager, and Agilo. Does anyone have any idea how to fix this? Thank you!



Thanks for reporting this problem. Can you please try and disable also the AdvancedTicketWorkflow plugin and see if the problem is still there?

Cheers


Stefano Rago

Elaborate Ruse

unread,
Jan 3, 2013, 6:31:17 PM1/3/13
to ag...@googlegroups.com
Hi Stefano,
   Thanks for your response.  We have mostly resolved this problem.  What we saw is that the problem actually had to do with Trac's new auto preview functionality.  I don't think line numbers will line up perfectly in this case, so I will attempt to describe the location where we found the issue.  

   Looking at a http://<tracserver>/<contextRoot>/ticket/#### document, we found that the callback function from the line $("#propertyform").autoSubmit(...) was not processing the data returned from the autoSubmit function properly.  The callback function is apparently intended to update various elements of the current page with elements scraped from the returned preview page.  However, the preview page returned by Agilo (the parameter reply' in the callback function) is not formatted exactly the same as the Trac JS function is expecting and the callback fails to find the view_time hidden input field.  

   When running the callback function, the line (~line 115 of mine, the line under the comment "Update view time") does not find any results with the filter "input[name='view_time']" because the actual input is several levels down in the "items" hierarchy.  It does not appear that the JQuery filter function is recursive, thus the value for view_time is not populated and the hidden input field for view_time is removed from the document (since it is being replaced with nothing).

  If you look at Trac's ticket.html template, you see that the hidden input for view_time is at the top level of the document (not including <html>).  Agilo uses a different template it seems (agilo_ticket_view.html among others), and the way the document tree comes out, the view_time hidden input is not inserted at the top level of the document (where it is expected by the Trac JS function).  Our somewhat hacky quick & dirty fix was to simply copy the hidden input field from Trac's ticket.html template and insert it into Agilo's agilo_ticket_view.html, etc.   Of course, I recognize that the fix is not perfect and we may come back with a cleaner fix, but hopefully the next version of Agilo will have a better fix than ours in it!

  Thanks again.

Stefano Rago

unread,
Jan 9, 2013, 3:18:22 AM1/9/13
to ag...@googlegroups.com
Hi and thanks for the detailed analysis and description!

It will be valuable in fixing this problem for our next release.

Cheers

Stefano Rago

--
Follow Agilo on Twitter: http://twitter.com/agilofortrac
Please support us by reviewing and voting on:
http://userstories.com/products/8-agilo-for-scrum
http://ohloh.net/p/agilo-trac
http://freshmeat.net/projects/agiloforscrum
 
You have received this message because you are subscribed to
the "Agilo for Trac" Google Group. This group is focused on
supporting Agilo for Trac users and is moderated by
Agilo Software GmbH <http://www.agilosoftware.com>.
 
To post to this group, send email to ag...@googlegroups.com
To unsubscribe from this group, send an email to
agilo+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/agilo


Message has been deleted

Stefano Rago

unread,
Jan 25, 2013, 4:11:38 AM1/25/13
to ag...@googlegroups.com
Hi Luigi,

please find attached a patch file that provides a workaround for this issue.

Basically the autoSubmit callback is being disabled on page ready (the same is happening in the 'New ticket page' already).

Hope this helps

Stefano

On Sunday, January 20, 2013 8:02:27 AM UTC+1, luigi.c...@gmail.com wrote:
Hi
I am experiencing th same problem with trac and Agilo.
If you are so kind, can you tell me exactly where you put the line with the view time hidden field (I think this one             <input type="hidden" name="view_time" value="${to_utimestamp(ticket['changetime'])}" />)
Thanks
Luigi

Il giorno giovedì 13 dicembre 2012 22:36:40 UTC+1, Elaborate Ruse ha scritto:
autopreview_bug.patch

luigi.c...@gmail.com

unread,
Jan 28, 2013, 12:06:42 PM1/28/13
to ag...@googlegroups.com
Dear Stefano
I thank you very much. As a matter of fact this problem was very annoying
Luigi

luigi.c...@gmail.com

unread,
Jan 28, 2013, 2:05:34 PM1/28/13
to ag...@googlegroups.com
Dear Stefano
I tried the patch and it seems to work avoiding the need of repeating the save action. Nevertheless it introduces another misbehaviour.
When I try to assign the ticket to another member of the team the combo box that should be used to select the name remains disabled and I cannot assign the ticket any more.
 
here below you can find the snippets of the file after applying the patch. Please, Let me know if I made something wrong
Thanks
Luigi
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      py:strip="True">
 
    <py:match path="head" once="True">
  <head>${select("*|text()")}
   <script type="text/javascript">
    /* <![CDATA[ */
    jQuery(function() {
     jQuery('#propertyform').unbind();
     jQuery('#propertyform').find("*").unbind();
    });

    /* ]]> */
   </script>
  </head>
 </py:match>
 

    <xi:include href="agilo_ticket_pane.html" />
 
    <!--! Remove the main ticket detail box but only if not in preview mode -->
    <py:match path="div[@id='ticket'][not(contains(@class, 'ticketdraft'))]" />
......

Stefano Rago

unread,
Feb 4, 2013, 5:28:54 AM2/4/13
to ag...@googlegroups.com
Hi Luigi,

apparently the workaround was not very well though of :-)

Here's another patch that needs to be applied after the other patch in this thread has been already applied.

This overrides the whole autoSubmit function, making it return right away, instead of the more brute force approach of the previous patch, consisting in removing all the handlers from the form elements.

This removal caused other handlers to be removed as well, and this prevented the select boxes from working as expected.

Please let us know if you still have problems.

Cheers

Stefano

autopreview_bug.patch

luigi.c...@gmail.com

unread,
Feb 5, 2013, 7:08:46 PM2/5/13
to ag...@googlegroups.com
Dear Stefano
Thank you very much
I will use apply this path as soosn as possible and I will report my findings
Luigi

Maximiliano Marques

unread,
Apr 22, 2013, 8:47:23 PM4/22/13
to ag...@googlegroups.com
After use the two pacths, It seems to work fine on Edit Tab but still giving the Warning when I comment a previous ticket right on View Tab.

Cheers,
Max
Reply all
Reply to author
Forward
0 new messages