Child pages
  • Add PriorityEventHandler to Core
Skip to end of metadata
Go to start of metadata

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/bf986a48dc1eade5#

We have PriorityHelper in Core, but to have full priority functionality, developer also needs PriorityEventHandler, which currently is copied between projects.

Related Tasks

INP-689 - Getting issue details... STATUS

11 Comments

  1. Sorry for the delay. Was lot of other stuff to do lately.

    Task created:

    INP-689 - Getting issue details... STATUS


    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.

    On Mon, Aug 2, 2010 at 12:32 PM, S.G. <sergb...@gmail.com> wrote:
    > We have PriorityHelper in Core, but to have full priority
    > functionality, developer also needs PriorityEventHandler, which
    > currently is copied between projects.

  2. Great improvement guys - will be testing this one shortly.

    Thanks.

  3. 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.

  4. Why ping? Task is already there for quite some time and needs testing.

  5. 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.

  6. 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).

  7. 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

  8. 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).

    On Sat, Sep 3, 2011 at 2:21 PM, S.G. <sergb...@gmail.com> wrote:
    > 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).

  9. So what's a next step here in this task?

    DA

  10. 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.
    On Sep 11, 2011 8:09 PM, "Dmitry A." <dandre...@gmail.com> wrote: