Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 145754 Details for
Bug 233757
sort jira versions shown in the task editor in reversed order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
show versions in reverse order like JIRA does
Show versions in reverse order like JIRA does.txt (text/plain), 1.69 KB, created by
Jacek Jaroczynski
on 2009-08-27 02:14:49 EDT
(
hide
)
Description:
show versions in reverse order like JIRA does
Filename:
MIME Type:
Creator:
Jacek Jaroczynski
Created:
2009-08-27 02:14:49 EDT
Size:
1.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.jira.core >Index: src/org/eclipse/mylyn/internal/jira/core/service/JiraClient.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.jira.core/src/org/eclipse/mylyn/internal/jira/core/service/JiraClient.java,v >retrieving revision 1.41 >diff -u -r1.41 JiraClient.java >--- src/org/eclipse/mylyn/internal/jira/core/service/JiraClient.java 24 Jul 2009 12:04:22 -0000 1.41 >+++ src/org/eclipse/mylyn/internal/jira/core/service/JiraClient.java 26 Aug 2009 14:22:12 -0000 >@@ -14,6 +14,10 @@ > > import java.io.File; > import java.io.OutputStream; >+import java.util.Arrays; >+import java.util.Collections; >+import java.util.Comparator; >+import java.util.List; > > import org.apache.commons.httpclient.methods.multipart.PartSource; > import org.eclipse.core.runtime.Assert; >@@ -389,8 +393,25 @@ > return (credentials != null) ? credentials.getUserName() : ""; //$NON-NLS-1$ > } > >+ /** >+ * Returns sorted list of versions in descended order (the same as JIRA presents) >+ * >+ * @param key >+ * @param monitor >+ * @return >+ * @throws JiraException >+ */ > public Version[] getVersions(String key, IProgressMonitor monitor) throws JiraException { >- return soapClient.getVersions(key, monitor); >+ >+ List<Version> versions = Arrays.asList(soapClient.getVersions(key, monitor)); >+ >+ Collections.sort(versions, new Comparator<Version>() { >+ public int compare(Version o1, Version o2) { >+ return o1.getSequence() > o2.getSequence() ? -1 : (o1.getSequence() == o2.getSequence() ? 0 : 1); >+ } >+ }); >+ >+ return versions.toArray(new Version[0]); > } > > @Override
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233757
:
145754
|
145858
|
145920
|
145921