Re: [Apache Bloodhound] #617: Switching from QCT to full create ticket page loses field values

2013-12-12 Thread Apache Bloodhound
#617: Switching from QCT to full create ticket page loses field values
+--
  Reporter:  mudri  |  Owner:  gjm
  Type:  defect | Status:  accepted
  Priority:  major  |  Milestone:
 Component:  ui design  |Version:
Resolution: |   Keywords:
+--
Changes (by gjm):

 * owner:   => gjm
 * status:  new => accepted


-- 
Ticket URL: 
Apache Bloodhound 
The Apache Bloodhound issue tracker


Re: [Apache Bloodhound] #617: Switching from QCT to full create ticket page loses field values

2013-12-12 Thread Apache Bloodhound
#617: Switching from QCT to full create ticket page loses field values
+-
  Reporter:  mudri  |  Owner:
  Type:  defect | Status:  new
  Priority:  major  |  Milestone:
 Component:  ui design  |Version:
Resolution: |   Keywords:
+-
Changes (by gjm):

 * status:  needinfo(new) => new
 * owner:  antony =>


Comment:

 Happy with the work so far. A few interesting aspects that might be
 improved on are:
  * modifying to deal with long free text fields (some browsers/webservers
 may lose a very long querystring
  * possibly dropping the {{{__FORM_TOKEN}}} and empty fields from the
 solution

 such enhancements can move to a new ticket though.

-- 
Ticket URL: 
Apache Bloodhound 
The Apache Bloodhound issue tracker


svn commit: r1550449 - in /bloodhound/trunk: bloodhound_multiproduct/multiproduct/ticket/web_ui.py bloodhound_theme/bhtheme/htdocs/js/theme.js

2013-12-12 Thread gjm
Author: gjm
Date: Thu Dec 12 16:37:31 2013
New Revision: 1550449

URL: http://svn.apache.org/r1550449
Log:
adds the ability to pass fields set in the qct form to the newticket page - 
towards #617, patch from antony

Modified:
bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/web_ui.py
bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js

Modified: bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/web_ui.py
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/web_ui.py?rev=1550449&r1=1550448&r2=1550449&view=diff
==
--- bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/web_ui.py 
(original)
+++ bloodhound/trunk/bloodhound_multiproduct/multiproduct/ticket/web_ui.py Thu 
Dec 12 16:37:31 2013
@@ -50,13 +50,29 @@ class ProductTicketModule(TicketModule):
 def process_request(self, req):
 """Override for TicketModule process_request"""
 ticketid = req.args.get('id')
-productid = req.args.get('productid','')
+productid = req.args.get('productid', '')
+qct_product = req.args.get('product')  # From QCT form
 if not ticketid:
 # if /newticket is executed in global scope (from QCT), redirect
 # the request to /products//newticket
-if not productid and not isinstance(self.env, ProductEnvironment):
+#
+# If here from "More fields" link then pass along QCT form fields.
+# If product arg present then redirect to
+# /products//newticket .
+
+if not productid and not qct_product and not isinstance(self.env,
+ProductEnvironment):
 products = Product.select(self.env, {'fields': ['prefix']})
-req.redirect(req.href.products(products[0].prefix, 
'newticket'))
+req.redirect(req.href.products(products[0].prefix, 'newticket',
+   req.args))
+elif qct_product:
+# Most likely arrived here via the QCT "More fields" link.
+# Use  to redirect to the appropriate product
+# scope
+
+req.args.pop('product')  # don't reenter block on redirect.
+req.redirect(req.href.products(qct_product, 'newticket',
+   req.args))
 return self._process_newticket_request(req)
 
 if req.path_info in ('/newticket', '/products'):

Modified: bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js?rev=1550449&r1=1550448&r2=1550449&view=diff
==
--- bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js Thu Dec 12 
16:37:31 2013
@@ -93,6 +93,17 @@ $( function () {
 content : function () { return qct_info.msg; }
   });
 
+/** 
+ * Pass QCT form fields to full ticket form when "More fields" is clicked
+ */
+$('#qct-more').click(function(e) {
+e.preventDefault();
+var href = $(this).attr('href');
+var params = $('#qct-form').serialize();
+params = params.replace(/field_/g, ''); // map to newticket querystring
+window.location = href + '?' + params;
+});
+
 $('body').on('click.close', '#qct-alert-close', 
 function (e) { qct_alert_close() });
 




[Apache Bloodhound] #727: Handle long free text entries in sending qct fields to newticket interface

2013-12-12 Thread Apache Bloodhound
#727: Handle long free text entries in sending qct fields to newticket interface
--+---
  Reporter:  gjm  |Owner:
  Type:  enhancement  |   Status:  new
  Priority:  major|  Version:
Resolution:   |
--+---
 #617 allowed users to change their minds while beginning to write a ticket
 to use the full newticket interface. However, where large amounts of text
 are used for the ticket description or other free text fields, there is a
 chance that some data will be lost which (potentially some browsers and
 some webservers may not like handle very long query strings - though old,
 see here http://www.boutell.com/newfaq/misc/urllength.html for instance).

-- 
Ticket URL: 
Apache Bloodhound 
The Apache Bloodhound issue tracker


Re: [Apache Bloodhound] #617: Switching from QCT to full create ticket page loses field values

2013-12-12 Thread Apache Bloodhound
#617: Switching from QCT to full create ticket page loses field values
+
  Reporter:  mudri  |  Owner:  gjm
  Type:  defect | Status:  closed
  Priority:  major  |  Milestone:
 Component:  ui design  |Version:
Resolution:  fixed  |   Keywords:
+
Changes (by gjm):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 r1550449 commits the patch from antony

 Further work should continue in #727

-- 
Ticket URL: 
Apache Bloodhound 
The Apache Bloodhound issue tracker


Re: [Apache Bloodhound] #617: Switching from QCT to full create ticket page loses field values

2013-12-12 Thread Apache Bloodhound
#617: Switching from QCT to full create ticket page loses field values
+---
  Reporter:  mudri  |  Owner:  antony
  Type:  defect | Status:  closed
  Priority:  major  |  Milestone:  Release 8
 Component:  ui design  |Version:
Resolution:  fixed  |   Keywords:
+---
Changes (by gjm):

 * owner:  gjm => antony
 * milestone:   => Release 8


-- 
Ticket URL: 
Apache Bloodhound 
The Apache Bloodhound issue tracker