Re: [Trac] Ticket query

2017-05-18 Thread toto200891
Yes It worked! Thank you.

Regards,
SF

On Wednesday, May 17, 2017 at 7:59:46 PM UTC+2, Peter Suter wrote:
>
> On 17.05.2017 10:19, toto200891 wrote:
>
>
>
> On Tuesday, May 16, 2017 at 5:50:12 PM UTC+2, hasienda wrote: 
>>
>> I found two issues while reading your code and message:
>>
>> Make sure to have the permission action named as you desire. In your 
>> message you spoke about 'TICKET_VIEW_STATUS' while it was written as 
>> 'TICKET_VIEW_STATUS' in code.
>>
> Yes the permission is given to the user 
>
> You may have missed the point:
> TICKET_VIEW_STATUS
> TICKET_STATUS_VIEW 
> These are NOT the same. Do not mix them.
>
> Regards,
> Peter
>
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Ticket query

2017-05-17 Thread Peter Suter

On 17.05.2017 10:19, toto200891 wrote:



On Tuesday, May 16, 2017 at 5:50:12 PM UTC+2, hasienda wrote:

I found two issues while reading your code and message:

Make sure to have the permission action named as you desire. In
your message you spoke about 'TICKET_VIEW_STATUS' while it was
written as 'TICKET_VIEW_STATUS' in code.

Yes the permission is given to the user


You may have missed the point:
TICKET_VIEW_STATUS
TICKET_STATUS_VIEW
These are NOT the same. Do not mix them.

Regards,
Peter

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Ticket query

2017-05-17 Thread toto200891


On Tuesday, May 16, 2017 at 5:50:12 PM UTC+2, hasienda wrote:
>
> I found two issues while reading your code and message:
>
> Make sure to have the permission action named as you desire. In your 
> message you spoke about 'TICKET_VIEW_STATUS' while it was written as 
> 'TICKET_VIEW_STATUS' in code.
>
Yes the permission is given to the user 

>
> For ticket status you'll need to compare to a string, so write it quoted 
> like 'test' or "test".
>
I even modified 'test' to a string format, But still It seems that there is 
something I'm missing. Because the user with TICKET_STATUS_VIEW permission 
still cannot see the ticket with status test. Any help is most appreciated.

> Steffen Hoffmann


Regards,
SF 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Ticket query

2017-05-16 Thread Steffen Hoffmann
I found two issues while reading your code and message:

Make sure to have the permission action named as you desire. In your message 
you spoke about 'TICKET_VIEW_STATUS' while it was written as 
'TICKET_VIEW_STATUS' in code.

For ticket status you'll need to compare to a string, so write it quoted like 
'test' or "test".
Steffen Hoffmann

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Ticket query

2017-05-16 Thread toto200891
Hi,

Will this policy allow a user with TICKET_VIEW_STATUS permission to view 
tickets whose status is TEST? Please have a look at policy below:

# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at http://trac.edgewall.org/log/.

from trac.core import *
from trac.perm import IPermissionPolicy, IPermissionRequestor
from trac.resource import ResourceNotFound
from trac.ticket.model import Ticket


class StatusDeskPolicy(Component):
"""Provides a permission for restricting ticket actions to the
ticket owner.
"""

implements(IPermissionPolicy, IPermissionRequestor)

# IPermissionRequestor methods

def get_permission_actions(self):
return ['TICKET_STATUS_VIEW']

# IPermissionPolicy methods

def check_permission(self, action, username, resource, perm):
if username != 'anonymous' and \
action == 'TICKET_VIEW' and \
'TICKET_ADMIN' not in perm:
if 'TICKET_STATUS_VIEW' in perm:
if resource is None or \
resource.realm == 'ticket' and \
resource.id is None:
return True
elif resource.realm == 'ticket' and \
resource.id is not None:
try:
ticket = Ticket(self.env, resource.id)
except ResourceNotFound:
pass
else:
return ticket['Status'] == test

END OF MESSAGE

Regards,

SF

On Tuesday, May 16, 2017 at 10:02:38 AM UTC+2, RjOllos wrote:
>
>
>
> On Tue, May 16, 2017 at 12:22 AM toto200891  > wrote:
>
>> Hi
>>
>> Same like SupportPolicy, is it possible to restrict the view of tickets 
>> to users based on Ticket status? As in, if there is certain group named 
>> testers, and tickets with being status TESTING, should only be viewed to 
>> testers and they should not be able to see all the new tickets. Is this 
>> possible?
>>
>> Regards,
>> SF
>>
>
> Yes, you can write a permission policy that restricts based on 
> ticket['status'] and req.authname (username).
>
> Examples of permission policies:
>
> https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.perm.IPermissionPolicy
> https://trac.edgewall.org/wiki/CookBook/PermissionPolicies 
>
> - Ryan
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] Ticket query

2017-05-16 Thread Ryan Ollos
On Tue, May 16, 2017 at 12:22 AM toto200891 
wrote:

> Hi
>
> Same like SupportPolicy, is it possible to restrict the view of tickets to
> users based on Ticket status? As in, if there is certain group named
> testers, and tickets with being status TESTING, should only be viewed to
> testers and they should not be able to see all the new tickets. Is this
> possible?
>
> Regards,
> SF
>

Yes, you can write a permission policy that restricts based on
ticket['status'] and req.authname (username).

Examples of permission policies:
https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.perm.IPermissionPolicy
https://trac.edgewall.org/wiki/CookBook/PermissionPolicies

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] Ticket query

2017-05-16 Thread toto200891
Hi

Same like SupportPolicy, is it possible to restrict the view of tickets to 
users based on Ticket status? As in, if there is certain group named testers, 
and tickets with being status TESTING, should only be viewed to testers and 
they should not be able to see all the new tickets. Is this possible?

Regards,
SF

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] TIcket Query

2017-05-10 Thread Ryan Ollos
On Wed, May 10, 2017 at 8:33 AM toto200891 
wrote:

> Yes I got that, thank you. But I was wondering if I could also sort the
> tickets? I mean by default it is in ascending order, how can I change to
> descending order?
>
> SF
>

The documentation pages I references describe the "desc" parameter.

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] TIcket Query

2017-05-10 Thread Jun Omae
On Thu, May 11, 2017 at 12:33 AM, toto200891  wrote:
>
> Yes I got that, thank you. But I was wondering if I could also sort the 
> tickets? I mean by default it is in ascending order, how can I change to 
> descending order?

Those are described in
https://trac.edgewall.org/wiki/TicketQuery#Usage. Please read the
document.

-- 
Jun Omae  (大前 潤)

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] TIcket Query

2017-05-10 Thread toto200891
Yes I got that, thank you. But I was wondering if I could also sort the 
tickets? I mean by default it is in ascending order, how can I change to 
descending order?

SF

On Wednesday, May 10, 2017 at 5:25:43 PM UTC+2, RjOllos wrote:
>
>
>
> On Wed, May 10, 2017 at 2:47 AM toto200891  > wrote:
>
>> Hi,
>>
>> Is it possible to limit the number of ticket queries? I mean if I am 
>> using TicketQuery Macro in my wiki page, I see that all my tickets are been 
>> displayed, and I would like to limit the number of tickets displayed on my 
>> wiki page. 
>>
>> I am using the following syntax for now:
>>
>>
>> [[TicketQuery(col=id|owner|reporter|status|created,rows=summary,table,width=800)]]
>>
>> Any suggestions are appreciated?
>>
>> Regards,
>>
>> SF
>>
>
> The macro has "max" parameter. 
>
> https://trac.edgewall.org/wiki/TicketQuery#Usage
> https://trac.edgewall.org/wiki/TracQuery#Customizingthetableformat
>
> - Ryan 
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Re: [Trac] TIcket Query

2017-05-10 Thread Ryan Ollos
On Wed, May 10, 2017 at 2:47 AM toto200891 
wrote:

> Hi,
>
> Is it possible to limit the number of ticket queries? I mean if I am using
> TicketQuery Macro in my wiki page, I see that all my tickets are been
> displayed, and I would like to limit the number of tickets displayed on my
> wiki page.
>
> I am using the following syntax for now:
>
>
> [[TicketQuery(col=id|owner|reporter|status|created,rows=summary,table,width=800)]]
>
> Any suggestions are appreciated?
>
> Regards,
>
> SF
>

The macro has "max" parameter.

https://trac.edgewall.org/wiki/TicketQuery#Usage
https://trac.edgewall.org/wiki/TracQuery#Customizingthetableformat

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] TIcket Query

2017-05-10 Thread toto200891
Hi,

Is it possible to limit the number of ticket queries? I mean if I am using 
TicketQuery Macro in my wiki page, I see that all my tickets are been 
displayed, and I would like to limit the number of tickets displayed on my 
wiki page. 

I am using the following syntax for now:

[[TicketQuery(col=id|owner|reporter|status|created,rows=summary,table,width=800)]]

Any suggestions are appreciated?

Regards,

SF

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


[Trac] ticket query for a user group

2012-07-17 Thread Brettschneider Falk
Hi,

I've created a few user groups and assigned them users.
I'd like to know if it's possible (or is there a plugin for it) to make a 
ticket query on the owner field by using the user group name, and I get tickets 
for all the users of that group then. Is that possible somehow?

CU, F@lk



Gesch?ftsf?hrer: Marcel Seeber * Dr. Oliver Vietze
Sitz der Gesellschaft: Radeberg
Amtsgericht Dresden: HRB 15379
Ust. ID: DE 189714583


-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] Ticket Query : full row at the bottom by SQL query

2011-10-17 Thread Ethan Jucovy
On Wed, Oct 12, 2011 at 4:26 PM, Roberto
wrote:

> Using format=table I'm able to have a full row at the bottom of the
> ticket like in:
>
>
> [[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|
> summary|owner|reporter,rows=description)]]
>
> Is there a way to do the same by an SQL query?
>

Use the magic _description_:

SELECT
   id AS ticket, summary, component, owner, status,
   description as _description_
  FROM ticket t

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



[Trac] Ticket Query : full row at the bottom by SQL query

2011-10-15 Thread Roberto
Using format=table I'm able to have a full row at the bottom of the
ticket like in:

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

Is there a way to do the same by an SQL query?

Thank you

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



[Trac] Ticket query involving elapsed time

2011-05-30 Thread Roger Oberholtzer
I am curious if it is possible to make a ticket query that has as a
component the elapsed time since a ticket was in a given state. For
example, how long since it's status was set to 'Testing'. I guess some
SQL could do this. But I would like to take advantage of the various
formatting options offered by the ticket query, if possible.


-- 
Roger Oberholtzer

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



[Trac] Ticket Query to find out the number of days taken to close ticket for all the ticket in DB ...Please HELP

2010-03-30 Thread Sreejesh Nair
HI ,

i am trying to get a ticket query that will give me the Number of days taken
to close the ticket all the tickets in my trac db

PLEESEEE HELP

thanks and Regards
Sri

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] ticket query question

2009-12-27 Thread Ryan J Ollos


Roger Oberholtzer-2 wrote:
> 
> Good news. Would this also be in the latest release that was announced a
> week or so ago? Or just in trunk?
> 

Appears to just have been updated on the trunk

http://trac.edgewall.org/wiki/WikiMacros#TicketQuery-macro
http://trac.edgewall.org/browser/trunk/trac/ticket/query.py

The latest 0.11 release, 0.11.6, does not have parse for 'or' from the input
string.

http://trac.edgewall.org/browser/tags/trac-0.11.6/trac/ticket/query.py

Relevant ticket is here: http://trac.edgewall.org/ticket/2647
-- 
View this message in context: 
http://old.nabble.com/ticket-query-question-tp26811851p26932595.html
Sent from the Trac Users mailing list archive at Nabble.com.

--

You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.




Re: [Trac] ticket query question

2009-12-22 Thread Remy Blank
Roger Oberholtzer wrote:
> Good news. Would this also be in the latest release that was announced a
> week or so ago? Or just in trunk?

Only on trunk. Which is now running on t.e.o, so you could play with it
there, if you like.

-- Remy



signature.asc
Description: OpenPGP digital signature


Re: [Trac] ticket query question

2009-12-22 Thread Roger Oberholtzer
On Wed, 2009-12-16 at 18:46 +0100, Remy Blank wrote:
> Roger Oberholtzer wrote:
> > However, I do not seen to be able to get the tickets that are either id
> > 1, 20 or 33, or have the text 'rmt' in their keywords. The result can be
> > more tickets, depending on the ones with rmt in the keyword.
> 
> This has been implemented recently on trunk, with the following syntax:
> 
>   id=1|20|33,or,keywords~=rmt

Good news. Would this also be in the latest release that was announced a
week or so ago? Or just in trunk?


-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden

Office: Int +46 10-615 60 20
Mobile: Int +46 70-815 1696


-- 
Roger Oberholtzer

--

You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.




Re: [Trac] ticket query question

2009-12-16 Thread Remy Blank
Roger Oberholtzer wrote:
> However, I do not seen to be able to get the tickets that are either id
> 1, 20 or 33, or have the text 'rmt' in their keywords. The result can be
> more tickets, depending on the ones with rmt in the keyword.

This has been implemented recently on trunk, with the following syntax:

  id=1|20|33,or,keywords~=rmt

-- Remy



signature.asc
Description: OpenPGP digital signature


[Trac] ticket query question

2009-12-16 Thread Roger Oberholtzer
In a TicketQuery, I can use:

id=1|20|33

to get tickets 1, 20 and 33

I can use:

keywords~=rmt

to get tickets with the text 'rmt' in their keywords

I can get only those tickets that have both with

id=1|20|33&keywords~=rmt

which returns those of tickets 1, 20 or 33 that also have 'rmt' in their
keywords.

So far, so good.

However, I do not seen to be able to get the tickets that are either id
1, 20 or 33, or have the text 'rmt' in their keywords. The result can be
more tickets, depending on the ones with rmt in the keyword.

Did I miss something obvious in the syntax?





-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden

Office: Int +46 10-615 60 20
Mobile: Int +46 70-815 1696


-- 
Roger Oberholtzer

--

You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.




[Trac] Ticket query by dates created/modified or by ticket number range.

2008-07-06 Thread Jani Tiainen

Wonder why Trac doesn't have possibility to search (or list) tickets by 
date created/modified or by ticket number.

Like today I had need to find ticket that was was creted (and modified) 
somewhere on last week. Then I remember that Trac doesn't have ability 
to search by dates (!). What's the rationale behind this?

Oh well, then I remembered that ticket number was somewhere between 600 
and 650, just didn't remembered exactly and  again, no search/list 
options to look for specified range.

That sucked big time.

Also from time to time I have been asked to have report about open 
tickets older XX days. Or tickets closes since day ZZ.

Maybe dates are not important in not-getting-away style OSS development 
but in business world dates seem to be everthing.

-- 
Jani Tiainen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---



[Trac] Ticket query replacing report module

2008-06-26 Thread Gary Oberbrunner

Hi folks; I'm running 0.11 (or nearly), and would like to write a new 
report.  I know that the report module's getting phased out in favor of 
TracQuery language.  I read http://trac.edgewall.org/wiki/TracQuery but 
two major things I don't see are how to select output columns nor how to 
select grouping nor sorting.  I made some queries myself and I see those 
are done by col=&col=, group=xxx, and order=xxx respectively.

Perhaps those should be documented in TracQuery on t.e.o?

And one more question: is it possible to select multi-level sorting like 
in SQL: order by foo,bar?  I tried order=foo|bar and order=foo&order=bar 
but neither seemed to work for me.

thanks again for a great tool!

-- 
Gary

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~--~~~~--~~--~--~---