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.3 (15 Jul 2025)

  • Return Trac ticket ID in response to ticket details request

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: 'id', '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.3.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.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trac_ticketrpc-0.9.3.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.3.tar.gz
Algorithm Hash digest
SHA256 44e1520e0180fc556c7b19aec7e70ac2025e1fa26b8d5e3a2bbf4653d9962891
MD5 5d450d2908b9731308cb17149b4ace98
BLAKE2b-256 f2c84d99ec26d8c1b530a3b38a63d60b55338ff0ef6678f74c0085c9f540af53

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trac_ticketrpc-0.9.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 32e2e75cb03cf19a3d2fada212e2cf0a579b4ed3ba31f3c00024534f04c500a9
MD5 a7ae88d4ab463341c20fe956a21ec53f
BLAKE2b-256 934db844c8d0b6175dd83d6aa645d45330d937324d83ab8c37d2e229191fdab1

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