Skip to content
Snippets Groups Projects
Commit 1c5d01bc authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Merge branch '#1063345-FixCampaignPlanningMariaDB' into '2020.2.0'

#1063345 fix campaign planning maria db

See merge request xrm/basic!391
parents c8b81797 e38c5698
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,17 @@ var TARGET_CONTEXT_ELEMENT = "CampaignStep";
var campaignRows = {};
var stepIds = {};
var stepsRows = stepCondition.select("CAMPAIGNSTEPID, CAMPAIGNSTEP.\"NAME\", CAMPAIGNSTEP.PREDECESSORSTEP_ID,"
+ " CAMPAIGNSTEP.DESCRIPTION, CAMPAIGNSTEP.DATE_START, CAMPAIGNSTEP.DATE_END, CAMPAIGNID, CAMPAIGN.\"NAME\", CAMPAIGN.STATUS")
var columnName = "\"NAME\"";
var alias = vars.get("$sys.dbalias");
var isMariaDB = db.getDatabaseType(alias) == db.DBTYPE_MARIADB10;
if (isMariaDB)
{
columnName = "\`NAME\`";
}
var stepsRows = stepCondition.select("CAMPAIGNSTEPID, CAMPAIGNSTEP."+ columnName + ", CAMPAIGNSTEP.PREDECESSORSTEP_ID,"
+ " CAMPAIGNSTEP.DESCRIPTION, CAMPAIGNSTEP.DATE_START, CAMPAIGNSTEP.DATE_END, CAMPAIGNID, CAMPAIGN."+ columnName +", CAMPAIGN.STATUS")
.from("CAMPAIGN")
.join("CAMPAIGNSTEP", "CAMPAIGN.CAMPAIGNID = CAMPAIGNSTEP.CAMPAIGN_ID")
.orderBy("SORTING")
......
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