I'm just seeing now that this is a Work revision. Is it possible that there is currently no way to add rel attributes for these relationships, and so the attributesSet value woudl be null, and not shown in the diff?
2021-07-01 18231, 2021
akashgp09
maybe i can test it again by adding this line to workRevision diff `relationshipSet.relationships.attributeSet.relationshipAttributes.value`
2021-07-01 18259, 2021
monkey
Ah, if it's not there that would 100% explain it
2021-07-01 18207, 2021
monkey
I thought you were using a series revision :p
2021-07-01 18222, 2021
monkey
So, yeah, that's definitely what it is
2021-07-01 18248, 2021
monkey
Otherwise these related models are not loaded
2021-07-01 18251, 2021
monkey
It ends up in `withRelated: includes` in the diffRevisions method
A Pail of Air is a relationship within that series entity.
2021-07-01 18230, 2021
monkey
Right, but the info I see is that of a workRevision, not a seriesRevision
2021-07-01 18212, 2021
monkey
To be clear, the revision in question will affect both the series and work entities, so for the same rev number you'll have a workRevision and a seriesRevision
So the top table is just the diff change paths, equivalent to the middle column of the second table (path) since there wasn't enough space to display it.
2021-07-01 18219, 2021
monkey
You'll see that attributeSetId has changed, along with the relationshipAttributes and their value
2021-07-01 18207, 2021
monkey
In the second table, the last two columns (lhs and rhs / left-hand side and right-hand side) show the value before and after the revision
2021-07-01 18216, 2021
monkey
Here's what I added to bookbrainz-site's src/server/routes/revison.js file:
So everything seems to be working okay as far as I can tell. The changes do need to be formatted and all that, but at least the diff has the appropriate changes I'm expecting to see.
2021-07-01 18213, 2021
monkey
So I think maybe you were only looking at the workRevision diffs and not the seriesRevision diffs
2021-07-01 18215, 2021
akashgp09
oooooh yess 🤦
2021-07-01 18237, 2021
akashgp09
It is indeed showing the diffs for attributes. My bad i never tested it by editing the relationship.
Right. the diffs only show changes, and if values on both sides are null (for example relationships with no attributes = null attributeSet) it won't show anything
2021-07-01 18233, 2021
monkey
No worries, at least we know this part of the diff works as expected, and while in there we've discovered that the entityRevisions all need to have that `relationshipSet.relationships.attributeSet.relationshipAttributes.value`, that's good progress
2021-07-01 18214, 2021
akashgp09
> if values on both sides are null (for example relationships with no attributes = null attributeSet) it won't show anything
2021-07-01 18222, 2021
akashgp09
I guess even we add a new relationship( which have attributes value )[Kind ="n")] the diff doesn't include the path attributeSet.
2021-07-01 18230, 2021
monkey
Exactly
2021-07-01 18203, 2021
monkey
If you then add an attribute, there will be an attributeSet with an id , that id will be ≠ null and will show in the diffs
2021-07-01 18245, 2021
monkey
And same if you then change the attribute value: new attributeSetID and attribute value will show in the diff
2021-07-01 18252, 2021
akashgp09
But for newly added relationship(with attributes)[Kind="n"] will also have attributeSetId isn't it ?
2021-07-01 18245, 2021
monkey
I'm not sure currently the attributeSetId will show up in the diffs