bvilla - 2010-01-28

I don't know if anyone is still monitoring this bug list, but I have some more information on this problem. I found that I could reproduce the bug by clicking on one of the rank arrows very rapidly. For example, continuously selecting the top row's down arrow should result in the top two issues being swapped back and forth. I believe that rapidly clicking the same arrow is similar to multiple clients all hitting the server at the same time. It takes about a minute of clicking at various speeds, but you can make it happen fairly consistently.

Internally, when the ranks are being swapped rapidly, the data being fetched by the plugin is not consistent. So far, I've found two places where the values will change unexpectedly possibly resulting in the wrong issues getting the wrong rank values. First, in AbastractIssueOrderAction.getIssue(), the "SessionAccess.getIssueNavigator().getSearchResults().getIssues()" might return the issues in a different order in some cases. This results in the rank of a different issue other than the two being swapped being changed.

The other instance where continuously hitting the server will result in inconsistent data is in the plugin's IssueOrderFieldType.getValueFromIssue() method. I have seen instances where an issue that has a rank value will start returning null and hence be assigned its internal ID for its rank order value.

At any rate, what I start to see after a while of rapid clicking is that issues start getting assigned their same order value and that is why they don't move. I haven't pinpointed the exact order of operations that leads to this but I do believe it has something to do with the plugin fetching data from sources that are either not fully initialized or are being changed mid-query.

Perhaps there is a way the plugin can work more atomically or wait until all the data is fully initialized before querying and updating values.