Bug 1020915 - Ordering processes/instances not working as expected
Ordering processes/instances not working as expected
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
unspecified
Unspecified Unspecified
high Severity medium
: ER1
: 6.0.2
Assigned To: Mauricio Salatino
Zuzana Krejčová
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-18 09:55 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:08 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
Trying to order processes and instances based on name, version, initiator, state and start date does not work as expected with various errors. Some of these issues include: sorting process definitions by process name puts definitions with name starting with an upper case letter first and sorting process definitions by version does not work at all. There are no workarounds at this stage. Cause: Consequence: Sorting process definitions by process name puts definitions with name starting with an upper case letter first. Sorting process definitions by version does not work at all. Workaround (if any): None. Result: User sorting process definitions by process name or version will get an unordered or incorrectly ordered list.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 15:49:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zuzana Krejčová 2013-10-18 09:55:50 EDT
Description of problem:
You can order processes and instances based on their name, version, initiator, state and start date. There are 5 issues with this:

1. Ordering by process name sorts instances based on process id instead.

2. Ordering by process name sorts processes starting with upper case letter first. Usually, alphabetical ordering considers lower and upper case variants of a letter as the same. Users will care about processes starting with a certain letter, not if it is lower or upper case.

3. Clicking Start Date header does nothing until you refresh the instance list or go to another page of the list (via pagination buttons at the bottom). This refresh changes the header but instances are still not ordered.

4. The same as item 3 happens for version in process definitions list.

5. Ordering instances by version considers 10 as less than 2.


Version-Release number of selected component (if applicable):
BPMS 6.0 ER4
Comment 1 Mauricio Salatino 2013-11-21 15:24:46 EST
Fixed in 6.0.x -> http://github.com/droolsjbpm/jbpm-console-ng/commit/e29f1d2e7
Comment 2 Zuzana Krejčová 2014-01-06 12:31:39 EST
Issue in item 2. still persists for process definitions, it is okay in process instances though.
Issue in item 4. still persists.

1. 3. and 5. are fixed, plus upper/lower case is not an issue for process instances.
Comment 4 Lukáš Petrovický 2014-02-07 11:19:07 EST
This no longer has a target release of 6.0.0.
Comment 5 Zuzana Krejčová 2014-02-21 05:52:46 EST
Could you please fix item 4 as well?

(Clicking Version header does nothing until you refresh the process definitions list or go to another page of the list (via pagination buttons at the bottom). This refresh changes the header but process definitions are still not ordered.)
Comment 6 Mauricio Salatino 2014-02-27 04:32:21 EST
Hi Zuzana, 
I couldn't reproduce this issue in 6.0.x.
Can you please send me the process definition that you are using to test.. because I'm guessing that it has something wrong in the version field? 
Notice that the version property in the process designer seems to be not validated.
Comment 7 Zuzana Krejčová 2014-02-27 11:37:33 EST
(In reply to Mauricio Salatino from comment #6)
> Hi Zuzana, 
> I couldn't reproduce this issue in 6.0.x.
> Can you please send me the process definition that you are using to test..
> because I'm guessing that it has something wrong in the version field? 
> Notice that the version property in the process designer seems to be not
> validated.

As I've said, the problem is with process definitions, not with process instances - were you testing with those? It does work with instances.
I have a wild guess why it does not work with definitions - could you take a look at ProcessDefinitionListViewImpl.java, lines 222-233 [1] and ProcessInstanceListViewImpl.java, lines 370-385 [2]?
You will see the following lines in ProcessInstanceListViewImpl but not in ProcessDefinitionListViewImpl:

}catch(NumberFormatException nfe){
    return o1.getProcessVersion().compareTo(o2.getProcessVersion());
} 

If I understand things correctly, this part of the code, the compare method, should be the same.

[1] 
https://github.com/droolsjbpm/jbpm-console-ng/blob/6.0.x/jbpm-console-ng-process-runtime/jbpm-console-ng-process-runtime-client/src/main/java/org/jbpm/console/ng/pr/client/editors/definition/list/ProcessDefinitionListViewImpl.java

[2]
https://github.com/droolsjbpm/jbpm-console-ng/blob/6.0.x/jbpm-console-ng-process-runtime/jbpm-console-ng-process-runtime-client/src/main/java/org/jbpm/console/ng/pr/client/editors/instance/list/ProcessInstanceListViewImpl.java
Comment 8 Rajesh Rajasekaran 2014-02-27 11:52:54 EST
Zuzana, can you create a new BZ for the outstanding issue? 
We can highlight the fixes already made for 6.0.1, the remaining issue would most likely be deferred to 6.0.2
Comment 10 Kris Verlaenen 2014-02-27 19:10:36 EST
In theory, that is probably too late, and I don't think trying to rush this in is going to help, so please do fix on master and leave commit id, we'll cherry-pick for 6.0.2 release.
Comment 11 Mauricio Salatino 2014-03-03 05:36:22 EST
Here is the commit in master that need to be cherry picked to 6.0.x

https://github.com/droolsjbpm/jbpm-console-ng/commit/6af4d92c27bb95658dc7c65bbcbd5344ce0992c8

Note You need to log in before you can comment on or make changes to this bug.