wiki:

TracQuery

Trac Ticket Queries

In addition to reports, Trac provides support for custom ticket queries, used to display lists of tickets meeting a specified set of 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 and no name/email 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 pulldown 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 pulldown menu of options can be added multiple times to perform an or of 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.

Once you've 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

Using the [[TicketQuery]] Macro

The TicketQuery macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.

Example:

[[TicketQuery(version=0.6|0.7&resolution=duplicate)]]

This is displayed as:

No results

Just like the query: wiki links, the parameter of this macro expects a query string formatted according to the rules of the simple ticket query language. This also allows displaying the link and description of a single ticket:

[[TicketQuery(id=123)]]

This is displayed as:

#123
Fuzzed sample crashes ffplay

A more compact representation without the ticket summaries is also available:

[[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]

This is displayed as:

No results

Finally, if you wish to receive only the number of defects that match the query, use the count parameter.

[[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]

This is displayed as:

0

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 by placing pipes (|) between the columns like below:

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

This is displayed as:

Results (1 - 3 of 4942)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#6596 fixed Add a little-endian G726 encoder alban.meffre
#6595 invalid OperationalError: database is locked max79
#6594 invalid VLC not displaying h264 closed captions MayeulC
1 2 3 4 5 6 7 8 9 10 11

Full rows

In table format you can also have full rows by using rows=<field> like below:

[[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 4942)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#6596 fixed Add a little-endian G726 encoder alban.meffre
Description

the G726 codec ffmpeg implementation seems not to comply with ITU standard below are the files and commands needed to perform verification

* test vectors *

original test vectors from the ITU in ASCII format (https://www.itu.int/net/itu-t/sigdb/speaudio/Gseries.htm)

NRM.M : the test input vector encoded in mu law (sample rate 8kHz, mono) RN24FM.I : the expected result , unpacked to right justified codes

input_mulaw.bin : binary version of the above NRM.M input file input_mulaw.wav : playable version

$ ffmpeg -f mulaw -ar 8000 -i input_mulaw.bin -acodec copy input_mulaw.wav

* encoding with ITU compliant G726 encoder *

g726encode.exe : g726 encoder from the ITU-T user's group on software tools

output_g726.bin : output result

$ g726encode.exe -3 -u -i input_mulaw.bin -o output_g726.bin

* binary comparison between output and ITU test vector *

RN24FM.bin : bit packed binary version of the above RN24FM.I file

!!!!!! these two file's contents are identical -> g726encode.exe IS ITU compliant !!!!!!

* decode and listen to the result *

output_g726_decoded_pcm_s16le.bin : decoded result of g726encode.exe

$ g726decode.exe -3 -l -i output_g726.bin -o output_g726_decoded_pcm_s16le.bin

this file can be played correctely -> g726decode.exe IS ITU compliant too

$ ffplay -f s16le -ar 8000 output_g726_decoded_pcm_s16le.bin

* encoding with ffmpeg and listen to the result *

output_g726_ffmpeg.bin : ffmpeg g726 encode output result output_g726_ffmpeg.wav : ffmpeg g726 encode output result (playable)

$ ffmpeg -f mulaw -ar 8000 -i input_mulaw.bin -acodec g726 -code_size 3 output_g726_ffmpeg.wav $ ffmpeg -f mulaw -ar 8000 -i input_mulaw.bin -acodec g726 -code_size 3 -f u8 output_g726_ffmpeg.bin

output_g726_ffmpeg_decoded_pcm_s16le.bin : decoded result of output_g726_ffmpeg.bin

$ g726decode.exe -3 -l -i output_g726_ffmpeg.bin -o output_g726_ffmpeg_decoded_pcm_s16le.bin

!!!!!! this file cannot be played correctely -> ffmpeg's implementation of the g726 codec is not compliant with ITU !!!!!!

$ ffplay -f s16le -ar 8000 output_g726_ffmpeg_decoded_pcm_s16le.bin

#6595 invalid OperationalError: database is locked max79
Description

Как воспроизвести

При выполнении операции POST по /ticket/6564, Trac выдает внутреннюю ошибку.

(просьба предоставить дополнительные подробности здесь)

Параметры запроса:

{'__FORM_TOKEN': u'be5b5ad9ec9eab73b6e4d8d9',
 'action': u'leave',
 'comment': u'Replying to [comment:1 atze]:\r\n> Maybe a duplicate of #6558 ?\r\nyeah seems as duplicate, please sorry for my inattention. But issue still not fixed. thank you for pointing!',
 'confirm_email': u'',
 'email_confirm': u'',
 'field_blockedby': u'',
 'field_blocking': u'',
 'field_checkbox_analyzed': u'1',
 'field_checkbox_reproduced': u'1',
 'field_component': u'avformat',
 'field_keywords': u'cue',
 'field_priority': u'normal',
 'field_summary': u'Built in CUE marks now lost in MP3',
 'field_type': u'defect',
 'field_version': u'unspecified',
 'id': u'6564',
 'replyto': u'1',
 'start_time': u'1502989801245669',
 'submit': u'\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f',
 'view_time': u'1502989801245669'}

User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; raidcall; Media Center PC 6.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko

Системная информация

Системная информация недоступна

Включенные плагины

Информация о плагинах недоступна

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 179, in process_request
    return self._process_ticket_request(req)
  File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 610, in _process_ticket_request
    valid = self._validate_ticket(req, ticket, not valid) and valid
  File "/usr/lib/python2.7/dist-packages/trac/ticket/web_ui.py", line 1278, in _validate_ticket
    for field, message in manipulator.validate_ticket(req, ticket):
  File "/usr/local/lib/python2.7/dist-packages/TracSpamFilter-1.0.8-py2.7.egg/tracspamfilter/adapters.py", line 63, in validate_ticket
    FilterSystem(self.env).test(req, author, changes)
  File "/usr/local/lib/python2.7/dist-packages/TracSpamFilter-1.0.8-py2.7.egg/tracspamfilter/filtersystem.py", line 226, in test
    self._record_action('test', 'error', '', strategy, time.time()-tim)
  File "/usr/local/lib/python2.7/dist-packages/TracSpamFilter-1.0.8-py2.7.egg/tracspamfilter/filtersystem.py", line 485, in _record_action
    stats.insert_or_update(name, action, data, status, delay, 1 if strategy.is_external() else 0)
  File "/usr/local/lib/python2.7/dist-packages/TracSpamFilter-1.0.8-py2.7.egg/tracspamfilter/model.py", line 394, in insert_or_update
    delay, delay, external, int(time())))
  File "/usr/lib/python2.7/dist-packages/trac/db/api.py", line 155, in __exit__
    self.db.commit()
OperationalError: database is locked
#6594 invalid VLC not displaying h264 closed captions MayeulC
Description

Summary of the bug: I have a video file in the mkv format, that contains an mp4 video track, in which there are some closed captions:

Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)

The closed captions are displayed fine on mpv, but not on vlc (or any other player I tried, for that matter; as they are probably based on ffmpeg).

I have also been unable to extract the subtitle track (though 'ffmpeg -f lavfi -i "movie=input.mp4[out0+subcc]" -map s output.srt' looked promising, it only produces a 0B srt file).

How to reproduce:

Load the video in vlc, and try to turn on the subtitles track: there is none. Do the same in mpv; subtitles are displayed

I wanted to upload the sample on upload.ffmpeg.org, but it seems to be down, so there it is (1.7MB): https://mega.nz/#!tBZnzAhY!K_PNpxDaRFYXS7firdWw0vAn4GrW8gpzX7-e-5ZlBFY

(The extract might contain some minor spoiler for game of thrones, I don't know as I am not personally interested in the series; the caption is "I wish you all the happiness in the world")

List of what was tried:

Players/tools I tried: Android: MX Player, Mobo Player, VLC for android -- failure | mpv-android: success Tools: mkvinfo, HandBrake?, MKVToolNix don't display any subtitle track (I stress that the track is embedded in the h264 video stream). Linux: VLC, Dragon Player, MPlayer, Kodi --failure | mpv: success

I tried this both on the mkv container and the extracted video track in a mp4 container (where possible).

The output of 'ffmpeg -f lavfi -i "movie=test.mp4[out0+subcc]"' has:

Input #0, lavfi, from 'movie=test.mp4[out0+subcc]':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1200k tbr, 1200k tbn, 1200k tbc
    Stream #0:1: Subtitle: eia_608

ffmpeg version (running on an updated Arch Linux):

ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.1 (GCC) 20170630
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-shared --enable-version3
libavutil      55. 58.100 / 55. 58.100
libavcodec     57. 89.100 / 57. 89.100
libavformat    57. 71.100 / 57. 71.100
libavdevice    57.  6.100 / 57.  6.100
libavfilter     6. 82.100 /  6. 82.100
libavresample   3.  5.  0 /  3.  5.  0
libswscale      4.  6.100 /  4.  6.100
libswresample   2.  7.100 /  2.  7.100
libpostproc    54.  5.100 / 54.  5.100
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. Basically, the filters are separated by ampersands (&). Each filter then 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 left out 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

Last modified 2 years ago Last modified on Jul 6, 2015, 10:44:56 PM