Summary | Combine "Tickets which are" and "Type" selects in Search form |
Queue | Whups |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | php (at) ideacode (dot) com |
Created | 01/22/2007 (6755 days ago) |
Due | |
Updated | 02/23/2008 (6358 days ago) |
Assigned | 02/22/2008 (6359 days ago) |
Resolved | 02/23/2008 (6358 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
New Attachment: Search.php.patch
(
Request #4107).the new code in whups/lib/Forms/Search.php seems to overwrite the
$types array inside the SearchForm-methode. my small patch solves this
(typo?).
thanks!
bunch of the code, move some into the search form's getInfo() method,
etc., but pretty good. Thanks!
State ⇒ Resolved
bunch of the code, move some into the search form's getInfo() method,
etc., but pretty good. Thanks!
Assigned to Chuck Hagenbuch
State ⇒ Assigned
is against whups 1.0-cvs.
were deposited when the download was made, I can only speculate: the
whups directory access time is 2006-08-09 23:09:05, and our first
recorded ticket was made on 11 Aug 2006. So, it seems reasonable
it'll be around those dates in August, 2006.
is against whups 1.0-cvs.
drop-down ("enum") to a multi-drop-down ("multi-enum"), and I added a
message declaring what would happen if you didn't select any of the
multi-enum values (this was for usability's sake).
In our use of Whups, it makes sense for us to be able to search across
all (allowed) queues. In general usage, however, this may not be
wanted. I'll let the "powers that be" decide if it's wanted. :)
unified diff, though? I find those much easier to read. Also, if you
can tell me what version/date of checkout the diff is against, I can
compare the original code from then with HEAD.
is against whups 1.0-cvs.
New Attachment: issue4928.unified.diff
can I render a table of multienums in a single row?
to be fancy, just override creation of a separate table row for each
input. (I'll get into more detail if you need, but there are some
around in whups - queries - and other apps.)
having essentially zero free time), so I didn't take this beyond the
screen shot you see attached to this ticket. I've also not
bulletproofed this code, as I got it to the level of "good enough" for
us. It seems to work fine, though.
HEAD, but yeah, that's likely fine. Feel free to add those unit
tests. :)
an explanatory whirl. I modified three files: 1 in Horde proper
(Horde/Form.php) and 2 in Whups (search.php & Forms/Search.php).
In Horde, the change was simply to add a utility method named
Horde_Form_Type::getValues() to recover the (presumably) private
$_values member variable. Call me OO-obsessive.
In Whups Forms/Search.php, I changed the queue selection from
drop-down ("enum") to a multi-drop-down ("multi-enum"), and I added a
message declaring what would happen if you didn't select any of the
multi-enum values (this was for usability's sake). I then needed to
remove the "Tickets which are" and "Types" variables and replace them
with a loop over all ticket types, adding multi-enum variables for
each ticket type.
In Whups search.php, I made the biggest changes. These were largely
cleanup operations, to aid in my development as I waded through the
code:
1. The code to determine the URL needed to re-run the query was moved
in to a function named getSearchReplayURL().
2. The code to save a search (if logged in) was simplified by using a
helper method called getNameForCriterion(): this method takes a
criterion name (such as "queue", "summary", etc), inspects the
submitted values, and then returns a human-understandable string
describing the submitted values. Owing to the changes mentioned in
Ticket 4897, this may no longer be needed.3. The code to "munge a query into acceptability" was moved into a
method called mungeInfo().
These should be relatively easy to patch into HEAD. Let me know if
you need more details. Thanks!
unified diff, though? I find those much easier to read. Also, if you
can tell me what version/date of checkout the diff is against, I can
compare the original code from then with HEAD.
provided a context diff for our version, would that be enough for
someone with more experience to apply it to HEAD?
learn HEAD and then find an example I can massage).
any good docs
or poignant example out there?
Another idea would be to just implement a custom variable type
instead, that rendered the three fields without starting another row -
might be simpler.
If you want to skip that part of the patch for now it'd probably be
easier for me to throw it together while committing it unfortunately.
I'm currently working on rewriting Horde_Form and the new version will
make this sort of thing much simpler (along with hopefully being
documented), but that's not something for before Horde 4 apps.
any good docs or poignant example out there?
I also wanted to produce the patch against HEAD, so as to ease
patching for you. But, I haven't yet established an environment with
that version.
can I render a table of multienums in a single row?
to be fancy, just override creation of a separate table row for each
input. (I'll get into more detail if you need, but there are some
around in whups - queries - and other apps.)
functional units as they stood were too broad for me to make surgical
changes and have any confidence that they worked (at least not
without substantial unit tests, which I couldn't find).
HEAD, but yeah, that's likely fine. Feel free to add those unit tests.
:)
New Attachment: ss4928.jpg
unified diff so it's easier to read? Thanks.
Before doing so, I'd like to finish the changes. My question is: how
can I render a table of multienums in a single row? In the attached
screenshot, you can see that the 4 ticket types we have (Bug,
Enhancement, Question, and Task) are each in their own row. I would
prefer to render these multienums horizontally (perhaps in a grid if
the number of types exceeds a threshold), but I couldn't figure out
how to do that without breaching the abstraction offered by
Horde_Form. Thoughts?
Also, you will notice that I have refactored the code -- the
functional units as they stood were too broad for me to make surgical
changes and have any confidence that they worked (at least not without
substantial unit tests, which I couldn't find).
State ⇒ Feedback
unified diff so it's easier to read? Thanks.
New Attachment: issue4928.patch
ticket. I could not figure out how to get the Horde_Form class to
render a table of multienums (or more generally how to define a
structured layout for a set of controls), so I simply list each type
on its own row with its states as a multi-enum. This is not ideal --
if someone can point me to how to structure controls, I'll make the
changes.
I also noticed that the lib/Forms/Search.php file looks to be in
Windows line ending mode, though the other changed files appear to be
in Unix line end mode. This might cause problems if running patch
directly with this patch file.
Please review and let me know any comments/suggestions you have and
also if you need more details to merge it against the latest CVS.
multi-select. This seems to be straightforward: simply changing the
variable type in lib/Forms/Search.php:SearchForm() from enum to
multi-enum.
State ⇒ Accepted
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Combine "Tickets which are" and "Type" selects in QuickSearch
Queue ⇒ Whups
ticket states shown are the Whups internal categories, which are not
directly exposed to the user elsewhere (unless your own states happen
to map 1:1 to those names). Second, you cannot make fine-grained
distinctions between the categorizations when you have multiple
"Assigned" states (eg states "Implement" and "Verify" are both
"Assigned").
The functionality of type and "tickets which are" can be achieved by
combining both into a table of multi-selects, one column for each
type. For example:
Bug Enhancement Task
---------------- | ------------------- | ------------ ....
Reported | Requested | .....
Open | Open
Fix | Implement
Verify | Verify
Deploy | Deploy
Resolved | Finished
With this construct, you can select multiple type and states in a
single motion. As an extension, clicking on the ticket type header
would select/deselect all the included states (or there could be an
explicit select/deselect all link).