Modify

Opened 12 years ago

Last modified 12 years ago

#10898 new defect

TicketSubmitPolicy not firing

Reported by: phooper0001@… Owned by: Ryan J Ollos
Priority: high Component: TicketSubmitPolicyPlugin
Severity: critical Keywords: ticketsubmitpolicy
Cc: sue.sml2006@… Trac Release: 0.12

Description (last modified by Ryan J Ollos)

I wonder if you could help me out.

I've installed and configured the ticket submit policy plugin ( confirmed in admin console; trac.ini contains config ; server restarted ) that you wrote, but it never fires. There are no relevant logs in the trac.log file and no errors ? Trac simply seems not to be parsing the config and acting upon it.

Snippets from trac.ini:

ticketsubmitpolicy.policies.ticketexcludes =  enabled
ticketsubmitpolicy.policies.ticketrequires = enabled
ticketsubmitpolicy.ticketsubmitpolicy.ticketsubmitpolicyplugin =  enabled

[ticket-submit-policy]
epic_tickets.condition = type is EPIC
epic_tickets.requires = summary, reporter, owner, description

There's really no point in sending you the trac.log as there's nothing relevant in there, however this is the content of the notification email, which clearly shows that the owner and description fields are NULL, where the ticket-submit-policy configuration required them to be present.

epic_tickets.requires = summary, reporter, owner, description

Notification email:

#29: TicketSubmitPoplicy is not firing
new EPIC
---------------------------------------------------------------------
Summary: TicketSubmitPoplicy is not firing
Reporter: hooper_p
Owner: (None)
Description: (None)
Type: EPIC
Status: new
Milestone: Backlog
Resolution: (None)
Keywords: (None)
Cc: (None)
Created: 2013-03-01 10:08:00.420726+00:00
Modified: 2013-03-01 10:08:00.420726+00:00
Due Date: 30.03.2013
Parent: (None)
Detected By: (None)
Assigned To: (None)
Component: cdbcore
Detected in sprint: (None)
Device Category: Mobile Handset
Device Name: HTC ONE
Device Operating System: Android 4.0.3
Browser Vendor: Google
Browser Name: Chrome
Browser Version: 10
Test Type: (None)
Trunk Allowed: 1
Added to build: (None)
Priority: (None)
Steps to reproduce the defect: (None)

Really hope you are able to shed some light on this - I've been to the forums, created tickets etc, but am going nowhere fast !

Thanks

Paul

Attachments (0)

Change History (17)

comment:1 Changed 12 years ago by anonymous

And the plugin loads without issue :

2013-03-01 10:21:28,078 Trac[loader] DEBUG: Loading ticketsubmitpolicy from /tdev15/scm/trac/env/cdbtest/plugins/TicketSubmitPolicy-0.8.1-py2.6.egg

comment:2 Changed 12 years ago by anonymous

Cc: sue.sml2006@… added

comment:3 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:4 Changed 12 years ago by anonymous

Bumping this for a response please ...

comment:5 in reply to:  description ; Changed 12 years ago by Ryan J Ollos

Replying to phooper0001@yahoo.com:

There are no relevant logs in the trac.log file and no errors ?

When you set the logging level to debug, can you see in the logs that the plugin has loaded? See t:TracLogging for more details.

You may have noticed on the project page that this plugin is not maintained, so you are unlikely to get a response from the author or previous maintainers.

comment:6 Changed 12 years ago by anonymous

That's the problem - there are no logs generated for this plugin :(

Trac.ini :

[logging]
log_file = trac.log
log_level = DEBUG
log_type = file

Are you in a position to help with debugging the problem ?

comment:7 in reply to:  6 Changed 12 years ago by Ryan J Ollos

Replying to anonymous:

That's the problem - there are no logs generated for this plugin :(

If you don't see any mention TicketSubmitPolicyPlugin in the logs, then the egg is not installed correctly. You should see either Loading or Skipping in the logs. However, you've said that you see the plugin in the admin console, so there must be some mention of it in the log. Maybe look closer ;)

Are you in a position to help with debugging the problem ?

Yes.

comment:8 Changed 12 years ago by anonymous

On closer look :

trac/env/cdbtest/log $ : ls -1
bitten
trac.log

trac/env/cdbtest/log $ : grep -i "TicketSubmitPolicyPlugin" * ; echo $? 
1

trac/env/cdbtest $ : ls -1 plugins/*Submit*
plugins/TicketSubmitPolicy-0.8.1-py2.6.egg

trac.ini:

ticketsubmitpolicy.policies.ticketexcludes = enabled
ticketsubmitpolicy.policies.ticketrequires = enabled
ticketsubmitpolicy.ticketsubmitpolicy.ticketsubmitpolicyplugin = enabled

[ticket-submit-policy]
policy1.condition = type is EPIC
policy1.requires = description

STILL NO LOG ENTRIES ! Any other suggestions to try ?

comment:9 in reply to:  8 Changed 12 years ago by Ryan J Ollos

Replying to anonymous:

STILL NO LOG ENTRIES ! Any other suggestions to try ?

I'll test it out and get back to you shortly

comment:10 Changed 12 years ago by phooper0001@…

Great thanks

comment:11 in reply to:  5 Changed 12 years ago by Ryan J Ollos

Replying to rjollos:

Replying to phooper0001@yahoo.com:

There are no relevant logs in the trac.log file and no errors ?

When you set the logging level to debug, can you see in the logs that the plugin has loaded? See t:TracLogging for more details.

I had overlooked your comment:1 earlier. So we are in good shape here.

What version of Python are you running?

comment:12 Changed 12 years ago by anonymous

Python 2.6

comment:13 Changed 12 years ago by Ryan J Ollos

I was looking in the wrong direction. I'm seeing errors in the JavaScript console.

comment:14 Changed 12 years ago by anonymous

Do you know how to fix them ?

comment:15 Changed 12 years ago by Ryan J Ollos

(In [12711])

Refs #10898: onsubmit event was not firing. This appeared to be due to the callback function having the same name as the event.

The dialog now appears, but does not block form submission

comment:16 Changed 12 years ago by Ryan J Ollos

Cc: jhammel@… removed
Owner: changed from obs to Ryan J Ollos

I see a few issues that need to be fixed, but I won't be able to continue working on this until at least Thursday.

The code is confusing, at least partially due to the way that JavaScript code needed to be injected into the template prior to Trac 0.12. With Trac 0.12, there came a function named add_script_data, that made it possible to pass data from Python to JavaScript. A good step here would be to move as much JavaScript code as possible into a dedicated file, and if we branch for Trac 0.12, we can move all of the JavaScript code into a dedicated file.

comment:17 Changed 12 years ago by anonymous

I'm so grateful for your comments on this as I'd really like to get this plugin running in my environment, but with very little Python/Javascript experience I'm at a loss. If you should have time to make the necessary changes and point me at a patch if would be very much appreciated.

Many thanks indeed up until now

Paul

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Ryan J Ollos.

Add Comment


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

 
Note: See TracTickets for help on using tickets.