IDEMPIERE-3551 External (non-plugin) 2Pack automation / fix problem reprocessing zip files from tenants
This commit is contained in:
parent
7c023a5ac3
commit
e8b0df69d3
|
@ -87,8 +87,17 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack
|
||||||
protected boolean installedPackage(String version) {
|
protected boolean installedPackage(String version) {
|
||||||
StringBuilder where = new StringBuilder("AD_Client_ID=? AND Name=? AND PK_Status='Completed successfully'");
|
StringBuilder where = new StringBuilder("AD_Client_ID=? AND Name=? AND PK_Status='Completed successfully'");
|
||||||
List<Object> params = new ArrayList<Object>();
|
List<Object> params = new ArrayList<Object>();
|
||||||
params.add(Env.getAD_Client_ID(Env.getCtx()));
|
String fileName = getName();
|
||||||
params.add(getName());
|
int clientId = Env.getAD_Client_ID(Env.getCtx());
|
||||||
|
if (version == null) {
|
||||||
|
String [] parts = fileName.split("_");
|
||||||
|
String clientValue = parts[1];
|
||||||
|
clientId = DB.getSQLValueEx(null, "SELECT AD_Client_ID FROM AD_Client WHERE Value=?", clientValue);
|
||||||
|
if (clientId < 0)
|
||||||
|
clientId = 0;
|
||||||
|
}
|
||||||
|
params.add(clientId);
|
||||||
|
params.add(fileName);
|
||||||
if (version != null) {
|
if (version != null) {
|
||||||
where.append(" AND PK_Version LIKE ?");
|
where.append(" AND PK_Version LIKE ?");
|
||||||
params.add(version + "%");
|
params.add(version + "%");
|
||||||
|
|
Loading…
Reference in New Issue