incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [15/42] git commit: [#6088] ticket:457 added project custom field into the help
Date Tue, 29 Oct 2013 22:23:16 GMT
[#6088] ticket:457 added project custom field into the help


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/04277d59
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/04277d59
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/04277d59

Branch: refs/heads/cj/6692
Commit: 04277d59157726937ca62cebfc700a06f9004f6c
Parents: b0c1db0
Author: coldmind <sokandpal@yandex.ru>
Authored: Mon Oct 21 16:47:48 2013 +0300
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Oct 24 20:22:58 2013 +0000

----------------------------------------------------------------------
 .../templates/tracker/search_help.html          | 112 ++++++++++---------
 ForgeTracker/forgetracker/tracker_main.py       |   2 +-
 2 files changed, 62 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/04277d59/ForgeTracker/forgetracker/templates/tracker/search_help.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/search_help.html b/ForgeTracker/forgetracker/templates/tracker/search_help.html
index 8f34549..851c190 100644
--- a/ForgeTracker/forgetracker/templates/tracker/search_help.html
+++ b/ForgeTracker/forgetracker/templates/tracker/search_help.html
@@ -31,57 +31,67 @@
 {% block header %}Search help{% endblock %}
 
 {% block content%}
-<div><h1>Searching for tickets</h1>
-<p>Searches use <a href="http://www.solrtutorial.com/solr-query-syntax.html" target="_blank">solr
lucene query syntax</a>. Use the following fields in tracker ticket searches:</p>
-<ul>
-<li>User who owns the ticket - assigned_to</li>
-<li>Labels assigned to the ticket - labels</li>
-<li>Milestone the ticket is assigned to - _milestone</li>
-<li>Last modified date - mod_date</li>
-<li>Created date - created_date</li>
-<li>Body of the ticket - text</li>
-<li>Number of ticket - ticket_num</li>
-<li>User who created the ticket - reported_by</li>
-<li>Status of the ticket - status</li>
-<li>Title of the ticket - summary</li>
-<li>Private ticket - private</li>
-<li>Votes up/down of the ticket - votes_up/votes_down (if enabled in tool options)</li>
-<li>Votes total of the ticket - votes_total</li>
-<li>Imported legacy id - import_id</li>
-<li>Custom field - the field name with an underscore in front, like _custom</li>
-</ul>
+    <div><h1>Searching for tickets</h1>
 
-<h2>Example searches</h2>
-<p>Any ticket that is not closed in the 1.0 milestone with "foo" in the title</p>
-<div class="codehilite"><pre>!status:closed AND summary:foo* AND _milestone:1.0</pre></div>
-<p>Tickets with the label "foo" but not the label "bar":</p>
-<div class="codehilite"><pre>labels:foo AND -labels:bar</pre></div>
-<p>Tickets assigned to or added by a user with the username "admin1" and the custom
field "size" set to 2</p>
-<div class="codehilite"><pre>(assigned_to_s:admin1 or reported_by_s:admin1) AND
_size:2</pre></div>
-<p>The ticket has "foo" as the title or the body with a number lower than 50</p>
-<div class="codehilite"><pre>(summary:foo or text:foo) AND ticket_num:[* TO 50]</pre></div>
-<p>Tickets last modified in April 2012</p>
-<div class="codehilite"><pre>mod_date_dt:[2012-04-01T00:00:00Z TO 2012-04-30T23:59:59Z]</pre></div>
-<p>Private tickets</p>
-<div class="codehilite"><pre>private:true</pre></div>
+    <h3>{{c.project.name}} project custom fields:</h3>
+    <ul>
+    {% for field in globals.custom_fields or [] %}
+        {% if field.name != '_milestone' %}
+            <li>{{field.name}}</li>
+        {% endif %}
+    {% endfor %}
+    </ul>
 
-<h2>Saving searches</h2>
-<p>Ticket searches may be saved for later use by project administrators. To save a
search, click "Edit Searches" in the tracker sidebar. Click "Add Bin" then enter a summary
and search terms for the saved search. Your search will now show up in the sidebar under "Searches"
with a count of how many tickets match the query.</p>
-<h2>Sorting search results</h2>
-<p>Ticket search results can be sorted by clicking the header of the column you want
to sort by. The first click will sort the results in ascending order. Clicking the header
again will sort the column in descending order. In addition to sorting by the column headers,
you can manually sort on these properties:</p>
-<ul>
-<li>Labels assigned to the ticket - labels_t</li>
-<li>Milestone the ticket is assigned to - _milestone_s</li>
-<li>Last modified date - mod_date_dt</li>
-<li>Created date - created_date_dt</li>
-<li>Body of the ticket - text_s</li>
-<li>Number of ticket - ticket_num_i</li>
-<li>User who created the ticket - reported_by_s</li>
-<li>Status of the ticket - status_s</li>
-<li>Title of the ticket - snippet_s</li>
-<li>Private ticket - private_b</li>
-<li>Custom field - the field name with an _ in front and _s at the end like _custom_s.
For Boolean custom fields use _b instead of _s. For Number custom fields use _i.</li>
-</ul>
-<p>You can use these properties by appending them to the url (only one sort allowed
at a time) like this:</p>
-<div class="codehilite"><pre>/p/yourproject/tickets/search/?q=_milestone:1.0&amp;sort=snippet_s+asc</pre></div></div>
+    <p>Searches use <a href="http://www.solrtutorial.com/solr-query-syntax.html"
target="_blank">solr lucene query syntax</a>. Use the following fields in tracker
ticket searches:</p>
+    <ul>
+    <li>User who owns the ticket - assigned_to</li>
+    <li>Labels assigned to the ticket - labels</li>
+    <li>Milestone the ticket is assigned to - _milestone</li>
+    <li>Last modified date - mod_date</li>
+    <li>Created date - created_date</li>
+    <li>Body of the ticket - text</li>
+    <li>Number of ticket - ticket_num</li>
+    <li>User who created the ticket - reported_by</li>
+    <li>Status of the ticket - status</li>
+    <li>Title of the ticket - summary</li>
+    <li>Private ticket - private</li>
+    <li>Votes up/down of the ticket - votes_up/votes_down (if enabled in tool options)</li>
+    <li>Votes total of the ticket - votes_total</li>
+    <li>Imported legacy id - import_id</li>
+    <li>Custom field - the field name with an underscore in front, like _custom</li>
+    </ul>
+
+    <h2>Example searches</h2>
+    <p>Any ticket that is not closed in the 1.0 milestone with "foo" in the title</p>
+    <div class="codehilite"><pre>!status:closed AND summary:foo* AND _milestone:1.0</pre></div>
+    <p>Tickets with the label "foo" but not the label "bar":</p>
+    <div class="codehilite"><pre>labels:foo AND -labels:bar</pre></div>
+    <p>Tickets assigned to or added by a user with the username "admin1" and the custom
field "size" set to 2</p>
+    <div class="codehilite"><pre>(assigned_to_s:admin1 or reported_by_s:admin1)
AND _size:2</pre></div>
+    <p>The ticket has "foo" as the title or the body with a number lower than 50</p>
+    <div class="codehilite"><pre>(summary:foo or text:foo) AND ticket_num:[*
TO 50]</pre></div>
+    <p>Tickets last modified in April 2012</p>
+    <div class="codehilite"><pre>mod_date_dt:[2012-04-01T00:00:00Z TO 2012-04-30T23:59:59Z]</pre></div>
+    <p>Private tickets</p>
+    <div class="codehilite"><pre>private:true</pre></div>
+
+    <h2>Saving searches</h2>
+    <p>Ticket searches may be saved for later use by project administrators. To save
a search, click "Edit Searches" in the tracker sidebar. Click "Add Bin" then enter a summary
and search terms for the saved search. Your search will now show up in the sidebar under "Searches"
with a count of how many tickets match the query.</p>
+    <h2>Sorting search results</h2>
+    <p>Ticket search results can be sorted by clicking the header of the column you
want to sort by. The first click will sort the results in ascending order. Clicking the header
again will sort the column in descending order. In addition to sorting by the column headers,
you can manually sort on these properties:</p>
+    <ul>
+    <li>Labels assigned to the ticket - labels_t</li>
+    <li>Milestone the ticket is assigned to - _milestone_s</li>
+    <li>Last modified date - mod_date_dt</li>
+    <li>Created date - created_date_dt</li>
+    <li>Body of the ticket - text_s</li>
+    <li>Number of ticket - ticket_num_i</li>
+    <li>User who created the ticket - reported_by_s</li>
+    <li>Status of the ticket - status_s</li>
+    <li>Title of the ticket - snippet_s</li>
+    <li>Private ticket - private_b</li>
+    <li>Custom field - the field name with an _ in front and _s at the end like _custom_s.
For Boolean custom fields use _b instead of _s. For Number custom fields use _i.</li>
+    </ul>
+    <p>You can use these properties by appending them to the url (only one sort allowed
at a time) like this:</p>
+    <div class="codehilite"><pre>/p/yourproject/tickets/search/?q=_milestone:1.0&amp;sort=snippet_s+asc</pre></div></div>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/04277d59/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index afb4079..46707e7 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -765,7 +765,7 @@ class RootController(BaseController, FeedController):
     @expose('jinja:forgetracker:templates/tracker/search_help.html')
     def search_help(self):
         'Static page with search help'
-        return dict()
+        return dict(globals=c.app.globals)
 
 
     @with_trailing_slash


Mime
View raw message