Skip to content

Commit fa7872b

Browse files
authored
Merge pull request #64 from intersystems-community/fix-description2
Fix description2
2 parents 47bb7dc + 2f87ef7 commit fa7872b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Module>
55
<Name>zpm-registry</Name>
66
<Description>Registry server for ZPM</Description>
7-
<Version>1.1.2</Version>
7+
<Version>1.1.4</Version>
88
<Packaging>module</Packaging>
99
<Dependencies>
1010
<ModuleReference>

src/cls/ZPM/Package.cls

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,10 @@ ClassMethod GetLatest(searchTerms As %DynamicArray = "", Output pStatus As %Stat
512512
}
513513
Set searchCondition = searchCondition_ " ) "
514514
}
515-
set sql = "SELECT name, repository, description, "_
516-
" ( SELECT TOP 1 version FROM ZPM.Package p2 WHERE p1.name=p2.name ORDER BY versionMajor DESC, versionMinor DESC, versionPatch DESC, versionPrerelease DESC, versionBuildmetadata DESC ) version " _
515+
set sql = "SELECT name, repository, description, version "_
517516
" FROM ZPM.Package p1 "_
518-
" WHERE "_searchCondition_" "_
519-
" GROUP BY name ORDER BY name"
517+
" WHERE "_searchCondition_" "_
518+
" AND p1.version = ( SELECT TOP 1 version FROM ZPM.Package p2 WHERE p1.name=p2.name ORDER BY versionMajor DESC, versionMinor DESC, versionPatch DESC, versionPrerelease DESC, versionBuildmetadata DESC ) "
520519

521520
Set tStatement = ##class(%SQL.Statement).%New()
522521
Set tStatus = tStatement.%Prepare(sql)

0 commit comments

Comments
 (0)