Skip to content
Snippets Groups Projects
Commit 5054dcfa authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

bugfix bei Modulen in 360 grad ohne aktiv-status

parent edf47623
No related branches found
No related tags found
No related merge requests found
......@@ -595,7 +595,13 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc
dateColumn = ", " + (ownContextSelector.getFullField(ownContextSelector.creationDateField) || "''");
var stateColumn = "";
if (pWithState === true)
stateColumn = ", " + (ownContextSelector.getFullField(ownContextSelector.stateField) || "''");
{
if (ownContextSelector.stateField)
stateColumn = ", " + (ownContextSelector.getFullField(ownContextSelector.stateField) || "''");
else
stateColumn = ", ''";
}
var contextDataSelect = newSelect(ownContextSelector.getFullIdField() + ", " + ownContextSelector.titleExpression + dateColumn + stateColumn)
......@@ -615,10 +621,14 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc
var condSub = newWhere();
activeStates.forEach(function (state)
{
if(pActive)
condSub.or(ownContextSelector.getFullField(ownContextSelector.stateField), state)
else
condSub.and(ownContextSelector.getFullField(ownContextSelector.stateField), state, "# != ?")
if (ownContextSelector.stateField)
{
if(pActive)
condSub.or(ownContextSelector.getFullField(ownContextSelector.stateField), state)
else
condSub.and(ownContextSelector.getFullField(ownContextSelector.stateField), state, "# != ?")
}
});
contextDataSelect.andIfSet(condSub);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment