[Tickets #3195] RESOLVED: Default States and Priorities

bugs@bugs.horde.org bugs at bugs.horde.org
Fri Mar 10 12:11:04 PST 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3195
-----------------------------------------------------------------------
 Ticket             | 3195
 Updated By         | cragos at speedex.net
 Summary            | Default States and Priorities
 Queue              | Whups
 State              | Bogus
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


cragos at speedex.net (2006-03-10 12:11) wrote:

I've hacked together a quick change to Nag where I upped the highest
possible priority level to 10.

However, it's an ugly hack, and there's a good possible fix.

In list.php, `conf/html.php`, and `lib/nag.php`, store a minimum and maximum
priority level.  Either store it in the db on a per-user basis and make it
user-definable, or just set it statically in `conf/prefs.php`.  I hope this
would be an easy thing to do.

What seems difficult is rethinking `conf/html.php` to the point where it can
handle extensibility.  As it is right now, the color and color while
highlighted of each task in `list.php` need to be statically defined in
`conf/html.php`

Pottential problem: When I tried adding new static colors in html.php, it
didn't work quite right.  When the summary items are highlighted, the
highlighted color shows up just fine.  After that, it switches to the
default color just fine.  However, when the page initially loads, the
summary items 6-10 are all just grey.

Again, please note that only three lines need to be changed to fix
everything but the colors.

Relevant bits of code:   
nag/lib/nag.php line 365:
#set max and min in pull-down menu
$descs = array(1 => _("(highest)"), 5 => _("(lowest)"));


nag/lib/nag.php line 368:
#set max and min in range for checking
for ($priority = 1; $priority <= 5; $priority++)

nag/list.php line 98: in NAG_SET_PRIORITY
#in list
($priority >= 1 || $priority <= 5)

nag/conf.php
-completely rewrite and/or remove .textX and .text-hiX section?

If you want to allow for use of the whole SMALLINT priority, you certainly
should be generating them automatically).  Otherwise, you could just define
a hundred or so numbers, and then refuse to load when using a range of more
than 100 priorities.  (Max-Min, and adjust to line up Min with 1 for static
color defs in `conf/html.php`)

I'd be happy to help, btw, but I am just starting to learn php.

~ MrZaius of #KCLUG
~ http://cragos@speedex.net




More information about the bugs mailing list