gandalf.api icon indicating copy to clipboard operation
gandalf.api copied to clipboard

Gandalf Web does not display Variants with Conditions like the Data Shows.

Open jsrosas opened this issue 7 years ago • 2 comments

Gandalf Web does not display the conditions for variants in the same order as from the Object or data in MongoDB. Please see the data from MongoDB and compare with screen shot from Gandalf Web. All fields for Rupee should be $is_set, but its taking properties from other fields. Thank you.

"variants" : [
		{
			"title" : "name",
			"description" : "description",
			"default_title" : "You may pass",
			"default_description" : "You may pass",
			"probability" : 0,
			"default_decision" : "You may pass",
			"rules" : [
				{
					"than" : "You are a NEWB",
					"title" : "You are a NEWB",
					"description" : "You are a NEWB",
					"conditions" : [
						{
							"field_key" : "profession",
							"condition" : "$eq",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fdc")
						},
						{
							"field_key" : "level",
							"condition" : "$eq",
							"value" : false,
							"_id" : ObjectId("58d3a8de917f1a6d63150fdd")
						},
						{
							"field_key" : "key",
							"condition" : "$eq",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fde")
						},
						{
							"field_key" : "rupee",
							"condition" : "$is_set",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fdf")
						}
					],
					"_id" : ObjectId("58d3a8de917f1a6d63150fe0")
				},
				{
					"than" : "You are not a WIZARD",
					"title" : "You are not a WIZARD",
					"description" : "You are not a WIZARD",
					"conditions" : [
						{
							"field_key" : "profession",
							"condition" : "$eq",
							"value" : false,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe1")
						},
						{
							"field_key" : "level",
							"condition" : "$is_set",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe2")
						},
						{
							"field_key" : "key",
							"condition" : "$is_set",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe3")
						},
						{
							"field_key" : "rupee",
							"condition" : "$is_set",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe4")
						}
					],
					"_id" : ObjectId("58d3a8de917f1a6d63150fe5")
				},
				{
					"than" : "You do not have the KEY",
					"title" : "You do not have the KEY",
					"description" : "You do not have the KEY",
					"conditions" : [
						{
							"field_key" : "profession",
							"condition" : "$eq",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe6")
						},
						{
							"field_key" : "level",
							"condition" : "$eq",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe7")
						},
						{
							"field_key" : "key",
							"condition" : "$eq",
							"value" : false,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe8")
						},
						{
							"field_key" : "rupee",
							"condition" : "$is_set",
							"value" : true,
							"_id" : ObjectId("58d3a8de917f1a6d63150fe9")
						}
					],
					"_id" : ObjectId("58d3a8de917f1a6d63150fea")
				}
			],
			"_id" : ObjectId("58d3a8de917f1a6d63150feb")
		}
	],

screen shot 2017-03-23 at 12 08 53 pm

jsrosas avatar Mar 23 '17 11:03 jsrosas

Hello, thanks for finding this bug.

I'll add this issues to our backlog, we will investigate and fix it whenever we will have some spare time.

AndrewDryga avatar Apr 01 '17 22:04 AndrewDryga

Thanks Andrew.

jsrosas avatar Apr 11 '17 12:04 jsrosas