Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12933 closed defect (fixed)

TracWorkflowAdminPlugin incompatible with Trac 1.2

Reported by: Jacob Owned by: Jun Omae
Priority: normal Component: TracWorkflowAdminPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2

Description

All works fine with TracWorkflowAdmin 0.12.0.2 in Trac 1.0.13, but after the upgrade to 1.2, Admin > Workflow Admin is empty (see attached screenshot).

And, if I click Restore Initial State, I get:

Trac detected an internal error:

TypeError: expected string or buffer

Using the Sandbox, I can see that Graphviz still works fine, so that's not it.

Attachments (2)

workflow-admin-blank-trac1.2.png (20.8 KB) - added by Jacob 6 years ago.
Empty Workflow Admin in Trac 1.2
workflow-error-1.2.gif (439.6 KB) - added by Jacob 6 years ago.
Animated GIF of error

Download all attachments as: .zip

Change History (17)

Changed 6 years ago by Jacob

Empty Workflow Admin in Trac 1.2

comment:1 Changed 6 years ago by Jun Omae

Please post the error with stacktrace after enabling TracLogging.

comment:2 Changed 6 years ago by Jacob

This is strange...

If I tail -f trac.log:

When I click 'Workflow Admin', all I see is this even though the page is basically empty as seen in the attachment:

2016-11-08 10:22:05,398 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/admin/ticket/workflowadmin'">
2016-11-08 10:22:05,401 Trac[main] DEBUG: Chosen handler is <Component trac.admin.web_ui.AdminModule>
2016-11-08 10:22:05,449 Trac[svn_fs] DEBUG: Subversion bindings imported
2016-11-08 10:22:05,452 Trac[api] INFO: Synchronized '(default)' repository in 0.05 seconds
2016-11-08 10:22:05,453 Trac[session] DEBUG: Retrieving session for ID u'jacob'
2016-11-08 10:22:05,454 Trac[api] DEBUG: action controllers for ticket workflow: ['ConfigurableTicketWorkflow']
2016-11-08 10:22:05,461 Trac[chrome] DEBUG: Prepare chrome data for request
2016-11-08 10:22:05,497 Trac[main] DEBUG: Rendering response from handler

If I then click 'Restore initial state', the TypeError is thrown but nothing is added to the log.

Instead, this is the Python traceback:

Most recent call last:

File "/usr/local/lib/python2.7/dist-packages/Trac-1.2-py2.7.egg/trac/web/main.py", line 613, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/local/lib/python2.7/dist-packages/Trac-1.2-py2.7.egg/trac/web/main.py", line 253, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/local/lib/python2.7/dist-packages/Trac-1.2-py2.7.egg/trac/admin/web_ui.py", line 108, in process_request
  provider.render_admin_panel(req, cat_id, panel_id, path_info)
File "/usr/local/lib/python2.7/dist-packages/TracWorkflowAdmin-0.12.0.2-py2.7.egg/tracworkflowadmin/web_ui.py", line 135, in render_admin_panel
  self._parse_request(req)
File "/usr/local/lib/python2.7/dist-packages/TracWorkflowAdmin-0.12.0.2-py2.7.egg/tracworkflowadmin/web_ui.py", line 671, in _parse_request
  params = json.loads(req.args.get('params'))
File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
  return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
  obj, end = self.raw_decode(s, idx=_w(s, 0).end())

comment:3 Changed 6 years ago by Jun Omae

Status: newaccepted

Thanks for the details. Okay. I'll investigate the issue with Trac 1.2.

comment:4 Changed 6 years ago by Jun Omae

Fixed broken workflow editor in [15945]. However, the plugin uses jquery-multiselect.js for Operations column but it is broken with jQuery 1.11.x bundled in Trac 1.2.

comment:5 Changed 6 years ago by Jacob

I personally don't have a problem with 2 separate jQuery libraries if that's what it will take...

comment:6 Changed 6 years ago by Jacob

Jun, if I apply your patch, where would I need to make a call to use a good version of jquery-multiselect? Which version works for you?

comment:7 Changed 6 years ago by Jun Omae

The plugin with jquery-multiselect.js 1.9 on Trac 1.2: TypeError: m.easing[this.easing] is not a function occurs. The plugin with jquery-multiselect.js 1.17 (latest) on Trac 1.2: the multiselect is shown at wrong position.

comment:8 Changed 6 years ago by Jun Omae

In 15980:

tracworkflowadmin: make work with Trac 1.2 and jQuery 1.11.x (refs #12933)

comment:9 Changed 6 years ago by Jun Omae

Resolution: fixed
Status: acceptedclosed

It works fine with Trac 1.2 now. Feel free to reopen this ticket or create new ticket if you encounter any issues with Trac 1.2.

Changed 6 years ago by Jacob

Attachment: workflow-error-1.2.gif added

Animated GIF of error

comment:10 Changed 6 years ago by Jacob

Resolution: fixed
Status: closedreopened

First I checked that the update works with Trac 1.0.13. It does.

Then I tried with 1.2. I've attached an animated gif that shows what I saw. I noticed that in 1.2 there are two new actions: create, and create_and_assign. Did the error I see come from the fact that my existing workflow didn't take them into account?

comment:11 Changed 6 years ago by Jun Omae

Please post stacktrace of the errors in your trac.log and javascript errors if javascript errors are raised.

comment:12 Changed 6 years ago by Jun Omae

In 16032:

tracworkflowadmin: add may_set_owner to default operations (refs #12933)

comment:13 Changed 6 years ago by Jun Omae

It seems to be caused by may_set_owner operation. The operation was not listed in default of [workflow-admin] operations option. In [16032], it is added to the option. Please try latest.

comment:14 Changed 6 years ago by Jacob

Resolution: fixed
Status: reopenedclosed

Just tried TracWorkflowAdmin 0.12.0.2. It works both in 1.0.13 and 1.2! Everything appears in the admin, and no more error messages.

I see that the workflow diagram automatically includes the new actions while keeping the custom workflow I already had in place.

Great job! 👏👏👏

And thanks

comment:15 Changed 6 years ago by Jun Omae

In 16035:

tracworkflowadmin: fix checkboxes in dropdown of permissions not clickable with Trac 1.2 (refs #12933)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.