Edgewall Software

This page documents the 1.0 release. Documentation for other releases can be found here.

Trac Ticket Queries

In addition to reports, Trac provides support for custom ticket queries, which can be used to display tickets that meet specified criteria.

To configure and execute a custom query, switch to the View Tickets module from the navigation bar, and select the Custom Query link.

Filters

When you first go to the query page, the default filter will display tickets relevant to you:

  • If logged in then all open tickets, it will display open tickets assigned to you.
  • If not logged in but you have specified a name or email address in the preferences, then it will display all open tickets where your email (or name if email not defined) is in the CC list.
  • If not logged in and no name/email is defined in the preferences, then all open issues are displayed.

Current filters can be removed by clicking the button to the left with the minus sign on the label. New filters are added from the dropdown lists at the bottom corners of the filters box; 'And' conditions on the left, 'Or' conditions on the right. Filters with either a text box or a dropdown menu of options can be added multiple times to perform an Or on the criteria.

You can use the fields just below the filters box to group the results based on a field, or display the full description for each ticket.

After you have edited your filters, click the Update button to refresh your results.

Clicking on one of the query results will take you to that ticket. You can navigate through the results by clicking the Next Ticket or Previous Ticket links just below the main menu bar, or click the Back to Query link to return to the query page.

You can safely edit any of the tickets and continue to navigate through the results using the Next/Previous/Back to Query links after saving your results. When you return to the query any tickets which were edited will be displayed with italicized text. If one of the tickets was edited such that it no longer matches the query criteria , the text will also be greyed. Lastly, if a new ticket matching the query criteria has been created, it will be shown in bold.

The query results can be refreshed and cleared of these status indicators by clicking the Update button again.

Saving Queries

Trac allows you to save the query as a named query accessible from the reports module. To save a query ensure that you have Updated the view and then click the Save query button displayed beneath the results. You can also save references to queries in Wiki content, as described below.

Note: one way to easily build queries like the ones below, you can build and test the queries in the Custom report module and when ready - click Save query. This will build the query string for you. All you need to do is remove the extra line breaks.

Note: you must have the REPORT_CREATE permission in order to save queries to the list of default reports. The Save query button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query.

You may want to save some queries so that you can come back to them later. You can do this by making a link to the query from any Wiki page.

[query:status=new|assigned|reopened&version=1.0 Active tickets against 1.0]

Which is displayed as:

Active tickets against 1.0

This uses a very simple query language to specify the criteria, see Query Language.

Alternatively, you can copy the query string of a query and paste that into the Wiki link, including the leading ? character:

[query:?status=new&status=assigned&status=reopened&group=owner Assigned tickets by owner]

Which is displayed as:

Assigned tickets by owner

Customizing the table format

You can also customize the columns displayed in the table format (format=table) by using col≤field>. You can specify multiple fields and what order they are displayed in by placing pipes (|) between the columns:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]

This is displayed as:

Full rows

In table format you can also have full rows by using rows≤field>:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]

This is displayed as:

Results (1 - 3 of 11241)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#13610 cantfix Some Unicode characters causing errors emeitner@…
Description

Creating ticket with Unicode emoji character in description results in:

 Trac detected an internal error:

DataError: (1366, "Incorrect string value: '\\xF0\\x9F\\x8E\\x85' for column `trac15`.`ticket_change`.`newvalue` at row 1")

Python Traceback

Most recent call last:

File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/web/main.py", line 610, in dispatch_request          
  dispatcher.dispatch(req)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/web/main.py", line 302, in dispatch          
  raise e
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/web/main.py", line 248, in dispatch          
  resp = chosen_handler.process_request(req)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/ticket/web_ui.py", line 162, in process_request          
  return self._process_newticket_request(req)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/ticket/web_ui.py", line 513, in _process_newticket_request          
  self._do_create(req, ticket, action)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/ticket/web_ui.py", line 1333, in _do_create          
  ticket.insert()
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/ticket/model.py", line 305, in insert          
  cursor.execute("INSERT INTO ticket (%s) VALUES (%s)"
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/db/util.py", line 73, in execute          
  return self.cursor.execute(sql_escape_percent(sql), args)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/trac/db/mysql_backend.py", line 50, in execute          
  return super().execute(query, args)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/cursors.py", line 153, in execute          
  result = self._query(query)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/cursors.py", line 322, in _query          
  conn.query(q)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/connections.py", line 558, in query          
  self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/connections.py", line 822, in _read_query_result          
  result.read()
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/connections.py", line 1200, in read          
  first_packet = self.connection._read_packet()
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/connections.py", line 772, in _read_packet          
  packet.raise_for_error()
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error          
  err.raise_mysql_exception(self._data)
File "/var/www/trac1.5/venv/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception          
  raise errorclass(errno, errval)

System Information

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0

Package	Version
Trac 	1.5.4
Jinja2 	3.1.2
mod_wsgi 	4.6.8 (WSGIProcessGroup trac WSGIApplicationGroup %{GLOBAL})
MySQL 	server: "5.5.5-10.3.38-MariaDB-0ubuntu0.20.04.1-log", client: "1.4.6", thread-safe: True
pymysql 	1.1.0
Python 	3.8.10 (default, May 26 2023, 14:05:08) [GCC 9.4.0]
setuptools 	44.0.0
jQuery	3.6.0
jQuery UI	1.13.0
jQuery Timepicker	1.6.3

Installed Plugins

Name 	Version 	Location
autocompleteusers 	N/A 	/var/www/trac1.5/proj/plugins/autocompleteusers.py
CustomNotifications 	N/A 	/var/www/trac1.5/proj/plugins/CustomNotifications.py
UserStats 	1.0 (r16991 ) 	/var/www/trac1.5/proj/plugins/UserStats.py 

The database encoding/collation seems to be correct:

SELECT DEFAULT_CHARACTER_SET_NAME,DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA 
WHERE schema_name = "trac15"

Returns: utf8, utf8_bin

SELECT TABLE_COLLATION
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = "trac15" and TABLE_NAME='ticket';

Returns: utf8_bin

#13608 fixed GitHub actions failure on Windows and Ubuntu Jun Omae Ryan J Ollos
Description

https://github.com/edgewall/trac/actions/runs/5409015542/jobs/9829868654

D:\a\trac\trac\contrib\make_status.py:13: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
  Package        Version
  -----------------------------------------------------------------------------------------------
  Python       : 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
  Setuptools   : 68.0.0
  Pip          : 23.1.2
  Wheel        : not installed
  Jinja2       : 3.1.2
  multipart    : 0.2.4
  Babel        : 2.9.1
  sqlite3      : 2.6.0 (3.42.0)
  PySqlite3    : not installed
  PyMySQL      : 1.4.6
  Psycopg2     : 2.9.6 (dt dec pq3 ext lo64)
  SVN bindings : 1.14.2 (r1899510)
  Mercurial    : not installed
  Pygments     : 2.15.1
  Textile      : 4.0.2
  Pytz         : 2023.3
  Docutils     : 0.20.1
  aiosmtpd     : 1.4.4.post2
  Selenium     : 4.10.0
  PyTidyLib    : 0.3.2 (5.9.14 C:\Users\runneradmin\AppData\Local\venv\Scripts\tidy.dll)
  LXML         : not installed
  coverage     : not installed

Variables:
  PATH=/mingw64/bin:/usr/bin:/c/Users/runneradmin/bin:/c/Users/runneradmin/AppData/Local/venv/Scripts:/c/Users/runneradmin/AppData/Local/venv/Scripts/Scripts:/c/Users/runneradmin/AppData/Local/subversion-1.14.2/x64/bin:/c/Users/runneradmin/AppData/Local/subversion-1.14.2/x64/python/3.11/bin:/c/Users/runneradmin/AppData/Local/venv/Scripts:/c/Program Files/PowerShell/7:/c/Users/runneradmin/AppData/Roaming/Python/Python311/Scripts:/c/hostedtoolcache/windows/Python/3.11.4/x64/Scripts:/c/hostedtoolcache/windows/Python/3.11.4/x64:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.11.1/x64:/c/cabal/bin:/c/ghcup/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.3.1/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/GitHub CLI:/bin:/c/Program Files (x86)/pipx_bin:/c/npm/prefix:/c/hostedtoolcache/windows/go/1.20.5/x64/bin:/c/hostedtoolcache/windows/Python/3.9.13/x64/Scripts:/c/hostedtoolcache/windows/Python/3.9.13/x64:/c/hostedtoolcache/windows/Ruby/3.0.6/x64/bin:/c/Program Files/OpenSSL/bin:/c/tools/kotlinc/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.372-7/x64/bin:/c/Program Files/ImageMagick-7.1.1-Q16-HDRI:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Program Files/Microsoft/jdk-11.0.16.101-hotspot/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files/dotnet:/c/ProgramData/Chocolatey/bin:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files/Microsoft SQL Server/150/Tools/Binn:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.7/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/cmd:/mingw64/bin:/usr/bin:/c/Program Files/GitHub CLI:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/LLVM/bin:/c/Users/runneradmin/.dotnet/tools:/c/Users/runneradmin/.cargo/bin:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps
  PYTHONPATH=.;C:\Users\runneradmin\AppData\Local\subversion-1.14.2\x64\python\3.11\lib;
  TRAC_TEST_DB_URI=
  server-options= -p 8000  -r -e 

D:\a\trac\trac\trac\__init__.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import DistributionNotFound, get_distribution
External dependencies:
  Git version: git version 2.41.0.windows.1
  Subversion version: 1.14.2

python  setup.py egg_info
C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\babel\messages\catalog.py:15: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
  from cgi import parse_header
C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
WARNING: The wheel package is not available.
running egg_info
D:\a\trac\trac\trac\__init__.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import DistributionNotFound, get_distribution
writing Trac.egg-info\PKG-INFO
writing dependency_links to Trac.egg-info\dependency_links.txt
writing entry points to Trac.egg-info\entry_points.txt
writing requirements to Trac.egg-info\requires.txt
writing top-level names to Trac.egg-info\top_level.txt
reading manifest file 'Trac.egg-info\SOURCES.txt'
adding license file 'COPYING'
adding license file 'AUTHORS'
writing manifest file 'Trac.egg-info\SOURCES.txt'
python  -m unittest -v trac.tests.functional.test_suite
D:\a\trac\trac\trac\__init__.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import DistributionNotFound, get_distribution
C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\passlib\context.py:2251: DeprecationWarning: CryptContext.hash(): 'scheme' keyword is deprecated as of Passlib 1.7, and will be removed in Passlib 2.0
  warn("CryptContext.hash(): 'scheme' keyword is deprecated as of "
D:\a\trac\trac\trac\__init__.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import DistributionNotFound, get_distribution
C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\passlib\context.py:2251: DeprecationWarning: CryptContext.hash(): 'scheme' keyword is deprecated as of Passlib 1.7, and will be removed in Passlib 2.0
  warn("CryptContext.hash(): 'scheme' keyword is deprecated as of "
D:\a\trac\trac\trac\__init__.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import DistributionNotFound, get_distribution
C:\Users\runneradmin\AppData\Local\venv\Lib\site-packages\passlib\context.py:2251: DeprecationWarning: CryptContext.hash(): 'scheme' keyword is deprecated as of Passlib 1.7, and will be removed in Passlib 2.0
  warn("CryptContext.hash(): 'scheme' keyword is deprecated as of "
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\unittest\__main__.py", line 18, in <module>
    main(module=None)
  File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\unittest\main.py", line 102, in __init__
    self.runTests()
  File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\unittest\main.py", line 274, in runTests
    self.result = testRunner.run(self.test)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\unittest\runner.py", line 217, in run
    test(result)
  File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\unittest\suite.py", line 84, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\unittest\suite.py", line 122, in run
    test(result)
  File "C:\hostedtoolcache\windows\Python\3.11.4\x64\Lib\unittest\suite.py", line 84, in __call__
    return self.run(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\trac\trac\trac\test.py", line 265, in run
    self.setUp()
  File "D:\a\trac\trac\trac\tests\functional\__init__.py", line 150, in setUp
    tc.init(port, server_port)
  File "D:\a\trac\trac\trac\tests\functional\better_twill.py", line 101, in init
    self.driver = self._create_webdriver()
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\trac\trac\trac\tests\functional\better_twill.py", line 145, in _create_webdriver
    return webdriver.Firefox(options=options,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: WebDriver.__init__() got an unexpected keyword argument 'service_log_path'
sys:1: ResourceWarning: unclosed file <_io.FileIO name='D:\\a\\trac\\trac\\testenv\\testing.log' mode='wb' closefd=True>
mingw32-make: *** [makefile:480: functional-test] Error 1
WARNING: 'make.exe functional-test testopts=-v' exited with 2
Error: Process completed with exit code 1.
#13605 fixed 2 test failures with Python 3.11 on Windows (part of #13402) Jun Omae Jun Omae
Description

I got 2 failures with Python 3.11 on Windows.

Python: /c/Users/runneradmin/AppData/Local/venv/Scripts/python 

  Package        Version
  -----------------------------------------------------------------------------------------------
  Python       : 3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]
  Setuptools   : 65.6.3
  Pip          : 22.3.1
  Wheel        : not installed
  Jinja2       : 3.1.2
  Babel        : not installed
  sqlite3      : 2.6.0 (3.39.4)
  PySqlite3    : not installed
  PyMySQL      : not installed
  Psycopg2     : not installed
  SVN bindings : not installed
  Mercurial    : not installed
  Pygments     : not installed
  Textile      : not installed
  Pytz         : not installed
  Docutils     : not installed
  Selenium     : 4.7.2
  PyTidyLib    : 0.3.2 (5.9.14 C:\Users\runneradmin\AppData\Local\venv\Scripts\tidy.dll)
  LXML         : not installed
  coverage     : not installed

Variables:
  PATH=/mingw64/bin:/usr/bin:/c/Users/runneradmin/bin:/c/Users/runneradmin/AppData/Local/venv/Scripts:/c/Users/runneradmin/AppData/Local/venv/Scripts/Scripts:/c/Users/runneradmin/AppData/Local/venv/Scripts:/c/Program Files/PowerShell/7:/c/Users/runneradmin/AppData/Roaming/Python/Python311/Scripts:/c/hostedtoolcache/windows/Python/3.11.1/x64/Scripts:/c/hostedtoolcache/windows/Python/3.11.1/x64:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.9.1/x64:/c/cabal/bin:/c/ghcup/bin:/c/tools/ghc-9.4.2/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.2.2/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/GitHub CLI:/bin:/c/Program Files (x86)/pipx_bin:/c/npm/prefix:/c/hostedtoolcache/windows/go/1.17.13/x64/bin:/c/hostedtoolcache/windows/Python/3.9.13/x64/Scripts:/c/hostedtoolcache/windows/Python/3.9.13/x64:/c/hostedtoolcache/windows/Ruby/3.0.5/x64/bin:/c/tools/kotlinc/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.352-8/x64/bin:/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Program Files/Microsoft/jdk-11.0.12.7-hotspot/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files/dotnet:/c/ProgramData/Chocolatey/bin:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files/Microsoft SQL Server/150/Tools/Binn:/c/Program Files/OpenSSL/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.6/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/cmd:/mingw64/bin:/usr/bin:/c/Program Files/GitHub CLI:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/LLVM/bin:/c/Users/runneradmin/.dotnet/tools:/c/Users/runneradmin/.cargo/bin:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps
  PYTHONPATH=.
  TRAC_TEST_DB_URI=
  server-options= -p 8000  -r -e 

External dependencies:
  Git version: git version 2.39.0.windows.1
  Subversion version: 1.14.2

...

======================================================================
ERROR: test_database_version (trac.tests.env.EnvironmentWithoutDataTestCase.test_database_version)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 620, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\runneradmin\\appdata\\local\\temp\\trac-testdir-uqx7slhr\\db\\trac.db'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\trac\trac\trac\tests\env.py", line 47, in tearDown
    rmtree(self.env.path)
  File "D:\a\trac\trac\trac\test.py", line 549, in rmtree
    shutil.rmtree(path, onerror=onerror)
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 759, in rmtree
    return _rmtree_unsafe(path, onerror)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 617, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 622, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "D:\a\trac\trac\trac\test.py", line 544, in onerror
    onerror(function, path, excinfo, retry + 1)
  File "D:\a\trac\trac\trac\test.py", line 544, in onerror
    onerror(function, path, excinfo, retry + 1)
  File "D:\a\trac\trac\trac\test.py", line 544, in onerror
    onerror(function, path, excinfo, retry + 1)
  [Previous line repeated 7 more times]
  File "D:\a\trac\trac\trac\test.py", line 536, in onerror
    function(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\runneradmin\\appdata\\local\\temp\\trac-testdir-uqx7slhr\\db\\trac.db'

======================================================================
ERROR: test_invalid_log_type_raises_exception (trac.tests.env.EnvironmentTestCase.test_invalid_log_type_raises_exception)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 620, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\runneradmin\\appdata\\local\\temp\\trac-testdir-1imzguf5\\db\\trac.db'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\trac\trac\trac\tests\env.py", line 106, in tearDown
    rmtree(self.env.path)
  File "D:\a\trac\trac\trac\test.py", line 549, in rmtree
    shutil.rmtree(path, onerror=onerror)
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 759, in rmtree
    return _rmtree_unsafe(path, onerror)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 617, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\hostedtoolcache\windows\Python\3.11.1\x64\Lib\shutil.py", line 622, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "D:\a\trac\trac\trac\test.py", line 544, in onerror
    onerror(function, path, excinfo, retry + 1)
  File "D:\a\trac\trac\trac\test.py", line 544, in onerror
    onerror(function, path, excinfo, retry + 1)
  File "D:\a\trac\trac\trac\test.py", line 544, in onerror
    onerror(function, path, excinfo, retry + 1)
  [Previous line repeated 7 more times]
  File "D:\a\trac\trac\trac\test.py", line 536, in onerror
    function(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\runneradmin\\appdata\\local\\temp\\trac-testdir-1imzguf5\\db\\trac.db'

----------------------------------------------------------------------
Ran 2465 tests in 261.398s

FAILED (errors=2, skipped=9)
1 2 3 4 5 6 7 8 9 10 11

Query Language

query: TracLinks and the [[TicketQuery]] macro both use a mini “query language” for specifying query filters. Filters are separated by ampersands (&). Each filter consists of the ticket field name, an operator and one or more values. More than one value are separated by a pipe (|), meaning that the filter matches any of the values. To include a literal & or | in a value, escape the character with a backslash (\).

The available operators are:

= the field content exactly matches one of the values
~= the field content contains one or more of the values
^= the field content starts with one of the values
$= the field content ends with one of the values

All of these operators can also be negated:

!= the field content matches none of the values
!~= the field content does not contain any of the values
!^= the field content does not start with any of the values
!$= the field content does not end with any of the values

The date fields created and modified can be constrained by using the = operator and specifying a value containing two dates separated by two dots (..). Either end of the date range can be left empty, meaning that the corresponding end of the range is open. The date parser understands a few natural date specifications like "3 weeks ago", "last month" and "now", as well as Bugzilla-style date specifications like "1d", "2w", "3m" or "4y" for 1 day, 2 weeks, 3 months and 4 years, respectively. Spaces in date specifications can be omitted to avoid having to quote the query string.

created=2007-01-01..2008-01-01 query tickets created in 2007
created=lastmonth..thismonth query tickets created during the previous month
modified=1weekago.. query tickets that have been modified in the last week
modified=..30daysago query tickets that have been inactive for the last 30 days

See also: TracTickets, TracReports, TracGuide, TicketQuery

Last modified 7 years ago Last modified on Nov 13, 2016, 12:25:32 AM
Note: See TracWiki for help on using the wiki.