Modify

Opened 4 years ago

Last modified 5 months ago

#8637 assigned defect

Context object changes breaks email2trac compatibility

Reported by: keith@… Owned by: hasienda
Priority: high Component: DiscussionPlugin
Severity: major Keywords: email2trac
Cc: Trac Release: 0.11

Description

email2trac trac:   File "/usr/local/bin/email2trac", line 1643, in parse
    self.discussion_topic_reply(m, subject[result.end('topic'):])

email2trac trac:   File "/usr/local/bin/email2trac", line 1350, in discussion_topic_reply
    topic = api.get_topic(context, self.id)

email2trac trac:   File "build/bdist.freebsd-7.2-STABLE-i386/egg/tracdiscussion/api.py", line 1544, in get_topic
    if subscriber not in context.users:

email2trac trac: AttributeError: 'Context' object has no attribute 'users'

I'm running trac 0.12.1 and the latest svn of discussion plugin and email2trac.

I think changeset 9770 might have something to do with this: http://trac-hacks.org/changeset/9770/discussionplugin/0.11/tracdiscussion/api.py

I opened a ticket w/ the email2trac devs as well, I don't know enough about trac hacking to figure out if the context object needs to be changed in email2trac or if something in discussion plugin needs to be changed. Please let me know if I can provide more information or test patches. Thanks

Attachments (0)

Change History (7)

comment:1 Changed 3 years ago by Blackhex

  • Priority changed from normal to high
  • Severity changed from normal to major
  • Status changed from new to assigned

This is caused by unfinished implementation of TracTags support. I'll will finish it as soon as my free time allows. Please meanwhile use older revision if you don't need tag support.

comment:2 in reply to: ↑ description Changed 5 months ago by hasienda

Replying to keith@…:

I opened a ticket w/ the email2trac devs as well,

Any pointer? I cannot seem to find it, only two other tickets related to this plugin.

comment:3 Changed 5 months ago by keith@…

It looks like their bug tracking system is not at the old url. The ticket I filed with them was https://subtrac.sara.nl/oss/email2trac/ticket/240 (deleted?)

I tracked the problem to a change in the discussion plugin api:
http://trac-hacks.org/changeset/9770/discussionplugin/0.11/tracdiscussion/api.py
(I think)

That's about all I remember about this problem.

Last edited 5 months ago by hasienda (previous) (diff)

comment:4 Changed 5 months ago by hasienda

I see. I've updated the URL to point at the current bug tracker, but exactly that ticket is not there.

comment:5 follow-up: Changed 5 months ago by hasienda

In 13930:

DiscussionPlugin: Prevent AttributeError when using API methods with pristine Trac context, refs #8637 and #11706.

This shall fix the issue reported for email2trac (yet untested) as well as
contribute to code robustness in general.

comment:6 in reply to: ↑ 5 Changed 5 months ago by hasienda

Replying to hasienda:

This shall fix the issue reported for email2trac (yet untested) ...

Test reports heartily welcome.

comment:7 Changed 5 months ago by hasienda

  • Owner changed from Blackhex to hasienda

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.