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

Expand on draft enabled entity #63

Closed
sbarzaghialteaup opened this issue Apr 30, 2020 · 6 comments
Closed

Expand on draft enabled entity #63

sbarzaghialteaup opened this issue Apr 30, 2020 · 6 comments
Assignees

Comments

@sbarzaghialteaup
Copy link

Hi,

I have a problem using TextArrangement if the associated entity is draft enabled.

Scenario:

@odata.draft.enabled
@cds.odata.valuelist
entity Servers
  name : String

@odata.draft.enabled
entity Systems
  name : String
  @Common      : {
                Text            : server.name,
                TextArrangement : #TextOnly
        }
  server : Association to Servers;

I edit the "Systems" entity with Fiori then I use the value help on the "server" field, when I close the value help I get the ID instead of the name:
image

Investigating I found that the get on the "Systems" draft entity returns null in the expand:

GET {{server}}/services/Systems(ID=9e1dde5c-9ddb-4700-9dc9-a5108d7150d2,IsActiveEntity=false)?
&$select=server
&$expand=server($select=name)

{
  "@odata.context": "$metadata#Systems(server,ID,IsActiveEntity,server(hostname,ID,IsActiveEntity))/$entity",
  "ID": "9e1dde5c-9ddb-4700-9dc9-a5108d7150d2",
  "IsActiveEntity": false,
  "server": null
}

If I remove the draft annotation on the "Servers" entity there is no the problem.
If I create a draft version of the "Server" entity I don't have the problem.
Seems that the expand is trying to read the draft version of the "Servers" entity.

This repository shows the problem:
https://github.com/sbarzaghialteaup/cap_test_draft

Thanks and Best Regards

@chgeo
Copy link
Member

chgeo commented May 5, 2020

@johannes-vogel can you take this, or someone from your team?

@johannes-vogel
Copy link
Contributor

@chgeo @sbarzaghialteaup We'll investigate and let you know.

@sbarzaghialteaup
Copy link
Author

sbarzaghialteaup commented Jun 3, 2020

@chgeo @sbarzaghialteaup We'll investigate and let you know.

Hi, news? Thank you

@johannes-vogel
Copy link
Contributor

@sbarzaghialteaup Please bear with us. We are working on it.

@vkozyura
Copy link
Contributor

vkozyura commented Jul 9, 2020

@sbarzaghialteaup: We implemented navigation using association from draft to active entity. Fix to be provided with the next release.

@vkozyura vkozyura closed this as completed Jul 9, 2020
@Lisi92
Copy link

Lisi92 commented Sep 10, 2021

In some of our valuehelps, we provide not saved data to the user. It worked fine for a while but i think this change, changed this Select too. So we only get the isactiveentity = true data. Exists there a property or an other solution to control it? Atm we overwrite it in the begin handler, its a fix but not a solution.

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

5 participants