You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@allura.apache.org by huzaifafaruqui <hu...@gmail.com> on 2017/03/14 17:26:04 UTC

[allura:tickets] #8059 Ticket search's dropdown filter choices should not show options from deleted tickets

Under class `Globals` in model/ticket.py , I can add another property:
` @property
def not_closed_deleted_query(self):
  return self.not_closed_query+' && deleted:False' `
  
& In tracker_main.py , in class RootController , method index(),
I replace  `c.app.globals.not_closed_query` with `c.app.globals.not_closed_deleted_query` as the query for paged_query_or_search


---

** [tickets:#8059] Ticket search's dropdown filter choices should not show options from deleted tickets**

**Status:** open
**Milestone:** unreleased
**Created:** Mon Feb 22, 2016 11:16 PM UTC by Dave Brondsema
**Last Updated:** Mon Feb 22, 2016 11:16 PM UTC
**Owner:** nobody


Example, you are regular user, not an admin.  On a ticket listing page you can click on the "Creator" column header and see all Creators listed as choices, even those of tickets that have been marked as deleted and are not visible to you.

In `paged_search` I think we need to have something like the `show_deleted` logic added in to the `q` query as well.  Regular users that aren't going to have access to private or deleted tickets should have those omitted in the initial search.  (Maybe just for deleted tickets and not private tickets, since private tickets will have certain users (submitter) that does have access to it)


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] Re: #8059 Ticket search's dropdown filter choices should not show options from deleted tickets

Posted by Dave Brondsema <da...@brondsema.net>.
Cool - if it all works, submit a merge request and I can take a better look at it that way.


---

** [tickets:#8059] Ticket search's dropdown filter choices should not show options from deleted tickets**

**Status:** open
**Milestone:** unreleased
**Created:** Mon Feb 22, 2016 11:16 PM UTC by Dave Brondsema
**Last Updated:** Tue Mar 14, 2017 05:26 PM UTC
**Owner:** nobody


Example, you are regular user, not an admin.  On a ticket listing page you can click on the "Creator" column header and see all Creators listed as choices, even those of tickets that have been marked as deleted and are not visible to you.

In `paged_search` I think we need to have something like the `show_deleted` logic added in to the `q` query as well.  Regular users that aren't going to have access to private or deleted tickets should have those omitted in the initial search.  (Maybe just for deleted tickets and not private tickets, since private tickets will have certain users (submitter) that does have access to it)


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] Re: #8059 Ticket search's dropdown filter choices should not show options from deleted tickets

Posted by huzaifafaruqui <hu...@gmail.com>.
In class `Ticket`, I can add a class method
~~~
@classmethod    
def not_deleted_query(cls,search_query):
    """Update search query to not include deleted tickets
    search_query - query in solr syntax
    """
    return search_query + ' && deleted: False'
~~~ 

Then, in  `paged_query_or_search()`, I can modify the `search_query` using this method
This fixes the issue for all the pages-tickets,milestones. "Show deleted tickets" still works


---

** [tickets:#8059] Ticket search's dropdown filter choices should not show options from deleted tickets**

**Status:** open
**Milestone:** unreleased
**Created:** Mon Feb 22, 2016 11:16 PM UTC by Dave Brondsema
**Last Updated:** Tue Mar 14, 2017 05:26 PM UTC
**Owner:** nobody


Example, you are regular user, not an admin.  On a ticket listing page you can click on the "Creator" column header and see all Creators listed as choices, even those of tickets that have been marked as deleted and are not visible to you.

In `paged_search` I think we need to have something like the `show_deleted` logic added in to the `q` query as well.  Regular users that aren't going to have access to private or deleted tickets should have those omitted in the initial search.  (Maybe just for deleted tickets and not private tickets, since private tickets will have certain users (submitter) that does have access to it)


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

[allura:tickets] Re: #8059 Ticket search's dropdown filter choices should not show options from deleted tickets

Posted by Dave Brondsema <da...@brondsema.net>.
What about other pages like a search or when you click on a milestone?  Those run from different controllers than `index`.  And admins have a "Show deleted tickets" link, so we'll want that option to continue to work for them.


---

** [tickets:#8059] Ticket search's dropdown filter choices should not show options from deleted tickets**

**Status:** open
**Milestone:** unreleased
**Created:** Mon Feb 22, 2016 11:16 PM UTC by Dave Brondsema
**Last Updated:** Tue Mar 14, 2017 05:26 PM UTC
**Owner:** nobody


Example, you are regular user, not an admin.  On a ticket listing page you can click on the "Creator" column header and see all Creators listed as choices, even those of tickets that have been marked as deleted and are not visible to you.

In `paged_search` I think we need to have something like the `show_deleted` logic added in to the `q` query as well.  Regular users that aren't going to have access to private or deleted tickets should have those omitted in the initial search.  (Maybe just for deleted tickets and not private tickets, since private tickets will have certain users (submitter) that does have access to it)


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.