Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

CommitTicketUpdater does not close ticket

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


markus.kremer at googlemail

Jun 29, 2012, 3:16 AM

Post #1 of 4 (236 views)
Permalink
CommitTicketUpdater does not close ticket

Hi,
i configured CommitTicketUpdater and it adds commit references to the
tickets. Unfortunately it does not close the ticket.
Here is my commit command:

svn ci -m "close #2"


Here are the debug logs:

2012-06-29 12:02:39,279 Trac[api] DEBUG: Event changeset_added on /svn/test
for changesets (u'41',)
2012-06-29 12:02:39,443 Trac[svn_fs] DEBUG: Subversion bindings imported
2012-06-29 12:02:39,448 Trac[cache] INFO: repos rev [41] != cached rev [40]
2012-06-29 12:02:39,452 Trac[cache] INFO: Trying to sync revision [41]
2012-06-29 12:02:39,456 Trac[cache] DEBUG: Caching node change in [41]:
(u'test', 'file', 'edit', u'test', 40L)
2012-06-29 12:02:39,637 Trac[api] DEBUG: Event changeset_added on test for
revision 41
2012-06-29 12:02:39,656 Trac[commit_updater] DEBUG: Updating ticket #2
2012-06-29 12:02:39,657 Trac[default_workflow] DEBUG: Workflow actions at
initialization: {u'resolve': {u'operations': [u'set_resolution'], 'name':
u'resolve', 'default': 0, 'newstate': u'closed', 'oldstates': [u'new',
u'assigned', u'accepted', u'reopened'], u'permissions':
[u'TICKET_MODIFY']}, u'accept': {u'operations': [u'set_owner_to_self'],
'name': u'accept', 'default': 0, 'newstate': u'accepted', 'oldstates':
[u'new', u'assigned', u'accepted', u'reopened'], u'permissions':
[u'TICKET_MODIFY']}, u'leave': {u'operations': [u'leave_status'], 'name':
u'leave', u'default': 1, 'newstate': u'*', 'oldstates': [u'*'],
'permissions': []}, u'reopen': {u'operations': [u'del_resolution'], 'name':
u'reopen', 'default': 0, 'newstate': u'reopened', 'oldstates': [u'closed'],
u'permissions': [u'TICKET_CREATE']}, u'reassign': {u'operations':
[u'set_owner'], 'name': u'reassign', 'default': 0, 'newstate': u'assigned',
'oldstates': [u'new', u'assigned', u'accepted', u'reopened'],
u'permissions': [u'TICKET_MODIFY']}, '_reset': {'operations':
['reset_workflow'], 'name': 'reset', 'default': 0, 'newstate': 'new',
'oldstates': [], 'permissions': []}}

2012-06-29 12:02:39,659 Trac[api] DEBUG: action controllers for ticket
workflow: ['ConfigurableTicketWorkflow']



And here is my configuration:

...

[components]
...

tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled

...

[ticket]
commit_ticket_update_check_perms = false
commit_ticket_update_commands.close = "close"
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_envelope =
commit_ticket_update_notify = true

...


I am using trac 0.12.3-1 from debian wheezy.

The ticket is assigned to bob and bob is the user that is committing.

What can i do to get 'close' working?

Thanks,
Markus

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/u_QWJRPOHKMJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


ryano at physiosonics

Jun 30, 2012, 3:54 PM

Post #2 of 4 (223 views)
Permalink
Re: CommitTicketUpdater does not close ticket [In reply to]

Some otheres were reporting this issue recently. You might want to take a
look at:

https://groups.google.com/d/topic/trac-users/BV1K8shUi6U/discussion

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/noe5O3PTgX0J.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


markus.kremer at googlemail

Jul 2, 2012, 1:00 AM

Post #3 of 4 (218 views)
Permalink
Re: CommitTicketUpdater does not close ticket [In reply to]

I did some debugging.
The problem is that inside _get_functions(self): the cmd string gets set to
"\"close\"" instead of "close".
These additional " cause my problem. I guess the problem is caused
by Python 2.7.3rc2, used by debian wheezy.

As a workaround i added one line
to /usr/lib/python2.7/dist-packages/tracopt/ticket/commit_updater.py :
_parse_message()
func = functions.get(cmd.lower())
+ if not func: func = functions.get("\"%s\""%cmd.lower())
if not func and self.commands_refs.strip() == '<ALL>':

You also need to remove the commit_update.pyc file and restart apache.


Am Sonntag, 1. Juli 2012 00:54:48 UTC+2 schrieb RjOllos:
>
> Some otheres were reporting this issue recently. You might want to take a
> look at:
>
> https://groups.google.com/d/topic/trac-users/BV1K8shUi6U/discussion
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/MrXUHZUc9SkJ.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.


markus.kremer at googlemail

Jul 2, 2012, 2:46 AM

Post #4 of 4 (214 views)
Permalink
Re: CommitTicketUpdater does not close ticket [In reply to]

The real problem was the "close" thing in the config file. After changing
commit_ticket_update_commands.close = "close"
to
commit_ticket_update_commands.close = close
everything works as expected.


Am Montag, 2. Juli 2012 10:00:03 UTC+2 schrieb Markus:
>
> I did some debugging.
> The problem is that inside _get_functions(self): the cmd string gets set
> to "\"close\"" instead of "close".
> These additional " cause my problem. I guess the problem is caused
> by Python 2.7.3rc2, used by debian wheezy.
>
> As a workaround i added one line
> to /usr/lib/python2.7/dist-packages/tracopt/ticket/commit_updater.py :
> _parse_message()
> func = functions.get(cmd.lower())
> + if not func: func = functions.get("\"%s\""%cmd.lower())
> if not func and self.commands_refs.strip() == '<ALL>':
>
> You also need to remove the commit_update.pyc file and restart apache.
>
>
> Am Sonntag, 1. Juli 2012 00:54:48 UTC+2 schrieb RjOllos:
>>
>> Some otheres were reporting this issue recently. You might want to take a
>> look at:
>>
>> https://groups.google.com/d/topic/trac-users/BV1K8shUi6U/discussion
>>
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/Zd_rlxUl4C8J.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.