Roundup Tracker - Issues

Issue 2550876

classification
Sort issues by message count
Type: behavior Severity: normal
Components: Interface Versions: 1.5
process
Status: closed
:
: : antmail, ezio.melotti, rouilj
Priority: :

Created on 2015-03-04 17:35 by antmail, last changed 2015-07-06 00:00 by rouilj.

Messages
msg5256 Author: [hidden] (antmail) Date: 2015-03-04 17:35
Greetings.

Is there a posibility to sort issues by messages count it contain?
msg5257 Author: [hidden] (ezio.melotti) Date: 2015-03-04 18:07
I don't think this is possible with a default installation, but you can
easily add it by doing something like
https://hg.python.org/tracker/python-dev/rev/2c07b699604c
msg5258 Author: [hidden] (rouilj) Date: 2015-03-04 19:16
Hello Anthony:

In message <1425490523.3.0.400423156491.issue2550876@psf.upfronthosting.co.za> 
<1425490523.3.0.400423156491.issue2550876@psf.upfronthosting.co.za>,
Anthony writes:

>Is there a posibility to sort issues by messages count it contain?

I can think of a couple of ways. The easiest is to add a new
number field to the issue called (for example) messagecount.

So in schema.py add:

 issue = IssueClass(db, "issue",
                      ... ,

                      messagecount=Number() )

Then in an auditor set the value of messagecount to the number of
elements in the messages multilink property plus 1.

Then modify the search and index pages to support the new field.
Sorting by the new field should just work I claim.

See:

  http://roundup.sourceforge.net/docs/customizing.html#adding-a-new-field-to-the-classic-schema

for more details on modifying the tracker to support the new field.

There isn't a good reference for the auditor, but searching:

   http://roundup.sourceforge.net/docs/customizing.html

has some example auditors.

Also rather than opening a ticket you may want to post your request to
the roundup-users list 
    (https://lists.sourceforge.net/lists/listinfo/roundup-users).
The mailing list has a much wider audience and somebody may already
have a solution for you.
msg5259 Author: [hidden] (antmail) Date: 2015-03-05 12:25
Thanks all for reply. 

I'll add counter to an issue class.

P.S. Ok, i'll use roundup-users list further.
msg5343 Author: [hidden] (rouilj) Date: 2015-07-06 00:00
I am marking this closed as there seems to be a resolution.
History
Date User Action Args
2015-07-06 00:00:37rouiljsetstatus: new -> closed
messages: + msg5343
2015-03-05 12:25:35antmailsetmessages: + msg5259
2015-03-04 19:16:52rouiljsetnosy: + rouilj
messages: + msg5258
2015-03-04 18:07:39ezio.melottisetnosy: + ezio.melotti
messages: + msg5257
2015-03-04 17:35:23antmailcreate