Skip to main content

Trac JSON RPC plugin for ticket management

Project description

Contributors Issues MIT License


trac-ticketrpc

Trac plugin to handle JSON RPC requests for ticket creation, update and details.
Documentation

Report Bug · Request Feature

About The Project

The plugin is intended as an interface for software development tools which want to use Trac as an external bug tracker.
It allows to create a new Trac ticket, post comments for a ticket, read details of a ticket and close an existing ticket.
Project was triggered, because I wanted to use Trac from Kiwi test case management system.

Changelog

v0.9.2 (11 Jul 2025)

  • Return full ticket details in response to ticket creation request

v0.9.1 (5 Jul 2025)

  • initial Release

Getting Started

Prerequisites

The plugin needs Python, version 3.7 or higher and Trac, version 1.6 or higher.

Installation

  1. Make sure you are working on the local Python installation used by your trac server, eventually activate appropriate virtual environment

  2. pip install trac_ticketrpc

  3. Enable plugin by adding the following in affected trac.ini files:

    [components]
    tracticketrpc.rpctickethandler.rpctickethandler = enabled

  4. Restart Trac server

JSON RPC API

All HTTP requests must be issued using method 'POST' and contain header attributes 'Content-type'='application/json' and 'Accept'='application/json'.
Make sure to supply a session cookie for methods changing Trac repository. This can be achieved by sending an HTTP GET request with valid credentials to Trac-Server-URL/project-name/login before the RPC request, but in the same session.
The plugin supports the methods listed below.

  • Create new ticket

    method: 'ticket.create'
    mandatory parameter: 'summary', 'description', 'project'
    optional parameter: 'priority', 'version', 'component'
    result: Trac ticket data as returned by ticket details

  • Add ticket comment

    method: 'ticket.add_comment'
    mandatory parameter: 'id', 'text', 'project'
    result: 'id'=Trac ticket ID, 'cnum'=comment number

  • Close ticket

    method: 'ticket.close'
    mandatory parameter: 'id', 'resolution', 'project'
    optional parameter: 'text'
    result: 'id'=Trac ticket ID

  • Get ticket details

    method: 'ticket.details'
    mandatory parameter: 'id', 'project'
    result: 'summary', 'reporter', 'owner', 'description', 'type', 'status', 'priority',
    'milestone', 'component', 'version', 'keywords', 'cc', 'time', 'changetime'

  • Get ticket comments

    method: 'ticket.comments'
    mandatory parameter: 'id', 'project'
    result: 'id', 'comments'

Contributing

Any contributions are greatly appreciated.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Frank Sommer - Frank.Sommer@sherpa-software.de

Project Link: https://github.com/FrankSommer-64/trac-ticketrpc

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trac_ticketrpc-0.9.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trac_ticketrpc-0.9.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file trac_ticketrpc-0.9.2.tar.gz.

File metadata

  • Download URL: trac_ticketrpc-0.9.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for trac_ticketrpc-0.9.2.tar.gz
Algorithm Hash digest
SHA256 04fb4056c32481654133dc7bbc598328b80861603d334c2c6268f4a8206bef3a
MD5 5fa8b39c3a8b8986812bfad1abb8b269
BLAKE2b-256 511856a76699c8953dc59fdd688cf334d6038050e83ce3e6ec19c5a95b86943d

See more details on using hashes here.

File details

Details for the file trac_ticketrpc-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: trac_ticketrpc-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for trac_ticketrpc-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad31561025e5692d40a45fe9444cffae5143773c8d0b211eee390c8896b77fdb
MD5 bbe98867c143ccb3391751d967c4ae09
BLAKE2b-256 f9068116568f3147241b2d291be751b5061c956a8358790aadb326124f6dd2da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page