History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRA-9931
Type: Bug Bug
Status: Resolved Resolved
Resolution: Obsolete
Priority: Minor Minor
Assignee: Unassigned
Reporter: Jeff Turner [Atlassian]
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JIRA

Failing validators during bulk transition cause index to be updated incorrectly

Created: 18/Apr/06 03:58 AM   Updated: 13/Feb/08 11:18 PM
Component/s: Workflow
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Reference
 

Participants: Anton Mazkovoi [Atlassian], Jeff Turner [Atlassian] and Timothy Chin [Atlassian]
Since last comment: 12 weeks, 5 days ago
Resolution Date: 13/Feb/08 11:18 PM
Labels:


 Description  « Hide
Say we have a validator (eg. to test a field is set) on the Resolve screen. If an issue is bulk transitioned (resolved) and the validator fails, then:
  • The index is updated to show the resolution is set.
  • The issue itself shows no resolution, and none is set in the database.

Reindexing fixes the inconsistency.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jeff Turner [Atlassian] - 18/Apr/06 04:00 AM
After discussion with Anton:

The problem arises because the bulk transition code updates the Issue object, then runs the validator, and irrespective of the validator results, reindexes the issue. So although the post-functions don't get run (because a validator failed) the modified Issue index is reindex, persisting any field updates (eg. resolution) to the index.

The solution is to not reindex issues in the bulk transition code, but rather rely on the reindexing post-function.


Timothy Chin [Atlassian] - 12/Feb/08 10:23 PM
Hi,

I've tested this with 3.11 and 3.12 and both returned the same error:

2008-02-13 12:26:55,591 http-8090-Processor20 ERROR [atlassian.jira.workflow.SimpleWorkflowManager] An exception occurred
[InvalidInputException: [Error map: [{}]] [Error list: [[User 'admin' doesn't have the 'worklogdeleteall' permission]]]
        at com.atlassian.jira.workflow.validator.AbstractPermissionValidator.hasUserPermission(AbstractPermissionValidator.java:42)
        at com.atlassian.jira.workflow.validator.PermissionValidator.validate(PermissionValidator.java:67)

However, my results were different from the description. After transitioning the issue via bulk and breaking the validation, the issue did not move on to the next status and the index was not updated. A re-index did not do anything.

It does not display a proper error message to the user that the process failed.


Anton Mazkovoi [Atlassian] - 13/Feb/08 01:15 AM
Timothy,

The errors above appeared in the log file, right? They did not appear in the UI.

It does not display a proper error message to the user that the process failed.

Yes, this is a bug tracked by JRA-9844.

Therefore, as the index is not corrupted it looks like this issue is no longer a problem. This issue is only about corrupting the index when validators fail.

Cheers,
Anton


Anton Mazkovoi [Atlassian] - 13/Feb/08 01:16 AM
Timothy,

Can you let me know if you agree?

Cheers,
Anton


Timothy Chin [Atlassian] - 13/Feb/08 01:22 AM
Anton,

Yes, this would be the same as JRA-9844. The index is not corrupted.

Also this error still happens on version 3.11 and 3.12 which could be an addition for JRA-9844.

Regards,
Timothy


Anton Mazkovoi [Atlassian] - 13/Feb/08 11:18 PM
Thanks for the update.

I will resolve this issue.

Cheers,
Anton