Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jsrosas opened this issue Mar 23, 2017 · 2 comments
Open

Comments

@jsrosas
Copy link

jsrosas commented Mar 23, 2017

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

@AndrewDryga
Copy link
Member

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.

@jsrosas
Copy link
Author

jsrosas commented Apr 11, 2017

Thanks Andrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants