Skip to content
Snippets Groups Projects
Commit e38be8aa authored by Simon Leipold's avatar Simon Leipold
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 2001796][ID Beobachtung beenden...

[Projekt: Entwicklung - Neon][TicketNr.: 2001796][ID Beobachtung beenden löscht keine child-subscriptions]
parent 297737c5
No related branches found
No related tags found
No related merge requests found
......@@ -499,7 +499,7 @@ Observation._syncTempObservationAndObservation = function (pTempObserver, pObser
Observation._syncRecordsSpecificValues(
pTempObserver[Observation.RECORDS_SPECIFIC_VALUES()],
observer[Observation.RECORDS_SPECIFIC_VALUES()]
);
);
}
else
{
......@@ -762,7 +762,9 @@ Observation._createNotification = function (variables)
*/
Observation.formatFieldValue = function (pRowData, pTypes, pField, pTimezone, pLocale)
{
var typeObject = Utils.isObject(pTypes[pField]) ? pTypes[pField] : {type: pTypes[pField]};
var typeObject = Utils.isObject(pTypes[pField]) ? pTypes[pField] : {
type: pTypes[pField]
};
switch (typeObject.type)
{
case "DATE":
......@@ -828,9 +830,17 @@ Observation.cancelAction = function ()
.and("OBSERVATION.OBSERVER", observer);
if (selectedUIDs.length)
{
{
//determine child subscriptions
var observation_ids = newSelect("OBSERVATION.OBSERVATIONID")
.from("OBSERVATION")
.where("OBSERVATION.OBJECT_ID",selectedUIDs, SqlBuilder.IN())
.arrayColumn();
cond.and("OBSERVATION.OBJECT_ID", selectedUIDs, SqlBuilder.IN())
.deleteData(true, "OBSERVATION");
//add child subscriptions for deletion
cond.or("OBSERVATION.OBSERVATION_ID", observation_ids, SqlBuilder.IN())
.deleteData(true, "OBSERVATION");
}
else
{
......
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