Add PriorityEventHandler to Core

10 views
Skip to first unread message

S.G.

unread,
Aug 2, 2010, 5:32:07 AM8/2/10
to In-Portal Development Team
We have PriorityHelper in Core, but to have full priority
functionality, developer also needs PriorityEventHandler, which
currently is copied between projects.

Alexander Obuhovich

unread,
Sep 7, 2010, 1:34:23 PM9/7/10
to in-por...@googlegroups.com
Sorry for the delay. Was lot of other stuff to do lately.

Task created: http://tracker.in-portal.org/view.php?id=856

Ready for testing.p

PriorityEventHandler allows to use more intuitive "Move Up"/"Move Down" functionality, which effectively cancels any other sorting, used in grid before.
--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com
priority_eh.patch

Dmitry Andrejev

unread,
Sep 10, 2010, 6:46:52 PM9/10/10
to in-por...@googlegroups.com
Great improvement guys - will be testing this one shortly.


Thanks.
--


Best regards,

Dmitry A.

Dmitry A.

unread,
Sep 12, 2010, 11:04:14 PM9/12/10
to In-Portal Development Team
Hi guys,


This might sound to you too easy to answer, but I haven't been using
this much before (or may I did, but didn't know) and would like to
learn more about this and how to apply this to the projects (and
obviously test).

Can one of you explain the the best Live Test case for myself to try
and learn.


Thanks for your time.


DA.

On Sep 10, 5:46 pm, Dmitry Andrejev <dandre...@gmail.com> wrote:
> Great improvement guys - will be testing this one shortly.
>
> Thanks.
>
> On Tue, Sep 7, 2010 at 12:34 PM, Alexander Obuhovich <aik.b...@gmail.com>wrote:
>
>
>
>
>
> > Sorry for the delay. Was lot of other stuff to do lately.
>
> > Task created:http://tracker.in-portal.org/view.php?id=856
>
> > Ready for testing.p
>
> > PriorityEventHandler allows to use more intuitive "Move Up"/"Move Down"
> > functionality, which effectively cancels any other sorting, used in grid
> > before.
>

Dmitry Andrejev

unread,
Sep 17, 2010, 12:33:10 PM9/17/10
to In-Portal Development Team
Ping!!!

Alexander Obuhovich

unread,
Sep 17, 2010, 1:44:47 PM9/17/10
to in-por...@googlegroups.com
Why ping? Task is already there for quite some time and needs testing.

Dmitry A.

unread,
Sep 19, 2010, 10:44:39 PM9/19/10
to In-Portal Development Team
Yes, this is true - task is already in place, but the "ping" was in
regard to my last question about how to actually use it :)


Cheers!

DA.

On Sep 17, 12:44 pm, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> Why ping? Task is already there for quite some time and needs testing.
>
> On Fri, Sep 17, 2010 at 7:33 PM, Dmitry Andrejev <dandre...@gmail.com>wrote:
>
>
>
>
>
> > Ping!!!
>

Alexander Obuhovich

unread,
Sep 20, 2010, 2:34:50 AM9/20/10
to in-por...@googlegroups.com
I wrote that in the task, when I sent it to testing. I can write it here too:

To test you need add unit config prefix (that already uses Move Up/Move Down functionality) to "priorities_config.php" (via OnAfterConfigRead hook of course).

S.G.

unread,
Sep 3, 2011, 7:21:08 AM9/3/11
to in-por...@googlegroups.com
Consider before closing this task: I found 2 problems with PriorityEventHandler.

1) When using Move Up and Move Down buttons with multiple items selected in grid, it could result in duplicate Priority field values in some cases.
2) Using Recalculate Priorities button (usually visible in debug mode only) resulted in Fatal error.

I fixed both issues, patch is attached. The patch is relative to last patch attached to task in tracker (v4).
priority_fixes.patch

Alexander Obuhovich

unread,
Sep 3, 2011, 9:26:38 AM9/3/11
to in-por...@googlegroups.com
Does $priorities[$id] value always match $old_priority value in your patch (code changed to enhance readability) or do they have different values and it us a bugfix part actually?

Also events of PriorityEventHandler are not supposed to be called directly, but only via hooks or kEvent::CallSubEvent method (see c:OnChangePriority). That's why proposed "getContrainInfo" method change doesn't seem to be an issue.


You might also consider applying latest patch from Issue Tracker, since it also contains temp handler fixes (move up/move down were using live table, when used from item editing in temp table).


Dmitry A.

unread,
Sep 11, 2011, 1:09:30 PM9/11/11
to in-por...@googlegroups.com
So what's a next step here in this task?

DA

Alexander Obuhovich

unread,
Sep 13, 2011, 2:49:44 AM9/13/11
to in-por...@googlegroups.com

Next step is to wait Sergey's answer to my question, since I won't be committing the code I don't fully understand.

Despite the fact, that this functionality is very useful it was totally ignored lately. I also saw that other programmers created something similar without searching for this first.

Reply all
Reply to author
Forward
0 new messages