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

NEX-172: Fix preview of previous revisions of nodes #250

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Conversation

vermario
Copy link
Collaborator

Link to ticket:

https://wunder.atlassian.net/browse/NEX-172

Changes proposed in this PR:

We were not correctly passing the node id when doing the graphql query to get the entity at a certain revision. This PR fixes that.

How to test:

  1. edit a piece of content
  2. a revision is created
  3. click on the "revisions" tab
  4. click on the link of the previous revision
  5. the content is shown at that revision

@vermario vermario requested a review from jekku123 September 27, 2024 08:15
Comment on lines -194 to +195
const [nodeId, revisionId] = previewData.resourceVersion.split(":");
const path = `/node/${nodeId}/revisions/${revisionId}/view`;
const [_, revisionId] = previewData.resourceVersion.split(":");
const path = `/node/${node.id}/revisions/${revisionId}/view`;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the resourceVersion property looks like this:

"id:20" for a revision with id 20.

So the existing code was just wrong :)

Copy link
Collaborator

@jekku123 jekku123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and approved!

@vermario vermario merged commit 1a000e4 into main Sep 27, 2024
6 checks passed
@vermario vermario deleted the NEX-172 branch September 27, 2024 10:17
jekku123 pushed a commit that referenced this pull request Oct 20, 2024
NEX-172: Fix preview of previous revisions of nodes
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

Successfully merging this pull request may close these issues.

2 participants