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

Include internalName in JSONReference #1111

Closed
metas-ts opened this issue Nov 23, 2018 · 2 comments
Closed

Include internalName in JSONReference #1111

metas-ts opened this issue Nov 23, 2018 · 2 comments

Comments

@metas-ts
Copy link
Member

Is this a bug or feature request?

FR

What is the current behavior?

Here is an example JSON as returned by the /rest/api/window/nnn/nnnnnn/references EP:

{
    "groups": [
        {
            "caption": "Finanzen",
            "references": [
                {
                    "id": "generic-540390",
                    "caption": "Debitoren Konten (#1)",
                    "documentType": "540390",
                    "documentsCount": 1,
                    "filter": {
                        "filterId": "C_BPartner_ID",
                        "caption": "Geschäftspartner t t",
                        "parameters": [
                            {
                                "parameterName": "C_BPartner_ID",
                                "value": 2156430,
                                "valueTo": null
                            }
                        ]
                    },
                    "loadDuration": "2.145 ms"
                },
                {
                    "id": "generic-540391",
                    "caption": "Kreditoren Konten (#1)",
                    "documentType": "540391",
                    "documentsCount": 1,
                    "filter": {
                        "filterId": "C_BPartner_ID",
                        "caption": "Geschäftspartner t t",
                        "parameters": [
                            {
                                "parameterName": "C_BPartner_ID",
                                "value": 2156430,
                                "valueTo": null
                            }
                        ]
                    },
                    "loadDuration": "2.348 ms"
                }
            ]
        }
    ],
    "references": [
        {
            "id": "generic-540390",
            "caption": "Debitoren Konten (#1)",
            "documentType": "540390",
            "documentsCount": 1,
            "filter": {
                "filterId": "C_BPartner_ID",
                "caption": "Geschäftspartner t t",
                "parameters": [
                    {
                        "parameterName": "C_BPartner_ID",
                        "value": 2156430,
                        "valueTo": null
                    }
                ]
            },
            "loadDuration": "2.145 ms"
        },
        {
            "id": "generic-540391",
            "caption": "Kreditoren Konten (#1)",
            "documentType": "540391",
            "documentsCount": 1,
            "filter": {
                "filterId": "C_BPartner_ID",
                "caption": "Geschäftspartner t t",
                "parameters": [
                    {
                        "parameterName": "C_BPartner_ID",
                        "value": 2156430,
                        "valueTo": null
                    }
                ]
            },
            "loadDuration": "2.348 ms"
        }
    ]
}

I.e. there is no "logical" internal name we can use to identify a single reference

What is the expected or desired behavior?

Include an internal name in that data, so we can have nice&clear commands in our cypress tests

@metas-ts
Copy link
Member Author

Dev-Test

Here is what the API returns.
Notes

  • "internalName": "C_Invoice_POTrx": this internal name was set in the AD_RelationType record.
  • "internalName": "AD_RelationType_ID-540222": this AD_RelationType with ID=540222 did not have an InternalName set.
{
    "groups": [
        {
            "caption": "CRM",
            "references": [
                {
                    "id": "relationType-540222",
                    "internalName": "AD_RelationType_ID-540222",
                    "caption": "Ausgehende Belege (#1)",
                    "documentType": "540170",
                    "documentsCount": 1,
                    "filter": {
                        "filterId": "MQuery-3c462ffc-fded-445c-bdbe-9e4c1d53ae97",
                        "caption": "Bestellung 820464",
                        "parameters": []
                    },
                    "loadDuration": "22.11 ms"
                }
            ]
        },
        {
            "caption": "Fakturierung",
            "references": [
                {
                    "id": "relationType-540161",
                    "internalName": "C_Invoice_POTrx",
                    "caption": "Eingangsrechnung (#1)",
                    "documentType": "183",
                    "documentsCount": 1,
                    "filter": {
                        "filterId": "MQuery-e162a71b-d54b-47b8-9a24-ccdb0dec1f2e",
                        "caption": "Bestellung 820464",
                        "parameters": []
                    },
                    "loadDuration": "9.171 ms"
                }
            ]
        }
    ],
    "references": [
        {
            "id": "relationType-540222",
            "internalName": "AD_RelationType_ID-540222",
            "caption": "Ausgehende Belege (#1)",
            "documentType": "540170",
            "documentsCount": 1,
            "filter": {
                "filterId": "MQuery-3c462ffc-fded-445c-bdbe-9e4c1d53ae97",
                "caption": "Bestellung 820464",
                "parameters": []
            },
            "loadDuration": "22.11 ms"
        },
        {
            "id": "relationType-540161",
            "internalName": "C_Invoice_POTrx",
            "caption": "Eingangsrechnung (#1)",
            "documentType": "183",
            "documentsCount": 1,
            "filter": {
                "filterId": "MQuery-e162a71b-d54b-47b8-9a24-ccdb0dec1f2e",
                "caption": "Bestellung 820464",
                "parameters": []
            },
            "loadDuration": "9.171 ms"
        }
    ]
}

metas-ts added a commit to metasfresh/metasfresh that referenced this issue Nov 23, 2018
metas-ts added a commit that referenced this issue Nov 23, 2018
* forward the ZoomInfo's InternalName to the APIs JSON response
#1111
@metas-ts metas-ts self-assigned this Nov 23, 2018
metas-ts added a commit that referenced this issue Nov 26, 2018
#1111-api - Include internalName in JSONReference
@metas-dh
Copy link
Member

Results of IT1
tested in mf15

  • references that are AD_RelationType have an internal name: OK
  • generic references which are not AD_RelationType don't have an internal name (yet): OK

metas-ts added a commit to metasfresh/metasfresh that referenced this issue Dec 2, 2018
  * [#4787](#4787) Product Document Note Translation
  * [#4789](#4789) C_BPartner filter for IsActive
  * [#4795](#4795) Product No. of customer also with ASI
  * [#1111](metasfresh/metasfresh-webui-api-legacy#1111) Include internalName in JSONReference
  * [#2083](metasfresh/metasfresh-webui-frontend-legacy#2083) cypress pressDoneButton shall fail if the respective record was not saved
  * [#4793](#4793) View docs_sales_invoice_details_compensation_subgroup: the invoice detail shall be taken from invoice
  * [#4797](#4797) HU Trace window: filtering by HUTaceType returns no results
  * [#4802](#4802) Required IfExists parameter 'ifBPartnersExist' is not present
  * [#2073](metasfresh/metasfresh-webui-frontend-legacy#2073) Failing cypress tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants