Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(458)

Unified Diff: MoinMoin/items/ticket.py

Issue 256230043: Advanced search for tickets
Patch Set: fixed userid and made it more like /+search view Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « MoinMoin/apps/frontend/views.py ('k') | MoinMoin/templates/ticket/advanced.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: MoinMoin/items/ticket.py
===================================================================
--- a/MoinMoin/items/ticket.py
+++ b/MoinMoin/items/ticket.py
@@ -23,7 +23,7 @@
Reference, BackReference, SelectSubmit, Text)
from MoinMoin.storage.middleware.protecting import AccessDenied
from MoinMoin.constants.keys import (ITEMTYPE, CONTENTTYPE, ITEMID, CURRENT,
- SUPERSEDED_BY, SUBSCRIPTIONS, DEPENDS_ON, NAME, SUMMARY, NAMESPACE)
+ SUPERSEDED_BY, SUBSCRIPTIONS, DEPENDS_ON, NAME, SUMMARY, NAMESPACE, USERID)
from MoinMoin.constants.contenttypes import CONTENTTYPE_USER
from MoinMoin.items import Item, Contentful, register, BaseModifyForm, get_itemtype_specific_tags
from MoinMoin.items.content import NonExistentContent
@@ -62,6 +62,18 @@
)
+class AdvancedSearchForm(Form):
+ summary = Text.using(label=L_("Summary"), optional=False).with_properties \
+ (widget=WIDGET_SEARCH, placeholder=L_("Find Tickets"))
+ effort = Rating.using(label=L_("Effort"))
+ difficulty = Rating.using(label=L_("Difficulty"))
+ severity = Rating.using(label=L_("Severity"))
+ priority = Rating.using(label=L_("Priority"))
+ tags = Tags.using(optional=True)
+ assigned_to = OptionalUserReference.using(label=L_("Assigned To"))
+ author = OptionalUserReference.using(label=L_("Author"))
+
+
class TicketMetaForm(Form):
summary = Text.using(label=L_("Summary"), optional=False).with_properties \
(widget=WIDGET_SEARCH, placeholder=L_("One-line summary"))
@@ -109,6 +121,7 @@
ITEMTYPE: item.itemtype,
# XXX support other markups
CONTENTTYPE: 'text/x.moin.wiki;charset=utf-8',
+ USERID: flaskg.user.itemid,
'closed': False,
}
meta.update(self['meta'].value)
« no previous file with comments | « MoinMoin/apps/frontend/views.py ('k') | MoinMoin/templates/ticket/advanced.html » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b