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

Classification store inheritance #3569

Open
mbolka opened this Issue Nov 6, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@mbolka
Contributor

mbolka commented Nov 6, 2018

Expected behavior

Classification store values are inherited in this same way as the rest of fields are.

Actual behavior

Classification store groups are copied from all parents and placed as an array of groups.

Steps to reproduce

Create a class with classification store field and inheritance enabled. Create an object of this class and a variant of it. Create a request asking for a variant with inheritance enabled.

Example

in a variant, I have the following data in a classification store:
g1: null
h1: #ce0808ff
j1: data
In the parent object I have the following data:
g1: data
h1: #000000ff
j1: data2
Json from web service response contains following informations:

 "groups": [
                        {
                            "id": 1,
                            "name": "g1 - ",
                            "keys": {
                                "default": [
                                    {
                                        "id": 2,
                                        "name": "h1",
                                        "description": null,
                                        "value": "#ce0808ff"
                                    },
                                    {
                                        "id": 3,
                                        "name": "j1",
                                        "description": null,
                                        "value": "data"
                                    }
                                ]
                            }
                        },
                        {
                            "id": 1,
                            "name": "g1 - ",
                            "keys": {
                                "default": [
                                    {
                                        "id": 1,
                                        "name": "g1",
                                        "description": null,
                                        "value": "data",
                                        "inheritedFrom": 1594
                                    },
                                    {
                                        "id": 2,
                                        "name": "h1",
                                        "description": null,
                                        "value": "#000000ff",
                                        "inheritedFrom": 1594
                                    },
                                    {
                                        "id": 3,
                                        "name": "j1",
                                        "description": null,
                                        "value": "data2",
                                        "inheritedFrom": 1594
                                    }
                                ]
                            }
                        }
              ]

Expected response

 "groups": [
                        {
                            "id": 1,
                            "name": "g1 - ",
                            "keys": {
                                "default": [
                                   {
                                        "id": 1,
                                        "name": "g1",
                                        "description": null,
                                        "value": "data",
                                        "inheritedFrom": 1594
                                    },
                                    {
                                        "id": 2,
                                        "name": "h1",
                                        "description": null,
                                        "value": "#ce0808ff"
                                    },
                                    {
                                        "id": 3,
                                        "name": "j1",
                                        "description": null,
                                        "value": "data"
                                    }
                                ]
                            }
                        },
                 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment