Community
Participate
Working Groups
The JIRA instance we use has been heavily customised. I found that Mylyn wasn't recognising that some custom JIRA Statii indicate that a the corresponding Mylyn task is to be marked as completed. A simple way to fix this is to mark the Mylyn task as completed if the JIRA issue has a resolution. Add this code to the end of: JiraRepositoryConnector.updateTaskFromTaskData(...) (I'll submit as a patch file in a comment) // PATCH: If JIRA issue has a resolution then mark it as completed String resolution = taskData.getAttributeValue(RepositoryTaskAttribute.RESOLUTION); if( resolution != null && resolution.length() > 0) { jiraTask.setCompleted(true); jiraTask.setCompletionDate(JiraUtils.stringToDate(taskData.getAttributeValue(RepositoryTaskAttribute.DATE_MODIFIED))); } There might be a better way by looking at meta data form JIRA on custom statii, but flaging completion based on having a resolution has been robust for me so far.
Created attachment 93714 [details] Patch for this fix.
*** Bug 208517 has been marked as a duplicate of this bug. ***
Thanks Mark. That's is a great suggestion! The code that determines whether a task is complete now checks for a resolution. This might still fail for some repository configurations but it is more robust than using hard-coded status ids.
Created attachment 94628 [details] mylyn/context/zip
BTW, I've seen some JIRA workflows that didn't change resolution to "unresolved" (-1) when reopening tasks. Though that might be considered a bug in custom workflow configuration and proposed enhancement would work great otherwise.