get "merge accounts" working again #5978 #5980
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5978
The NamedQuery
GuestbookResponse.findByAuthenticatedUserId
was removed in pull request #5863 and I don't know why.What I do know is that UsersIT.testMergeAccounts is failing, as reported in #5978
This pull request restores the NamedQuery back to how it was in Dataverse 4.15 before pull request #5863 was merged.
I haven't tested if the "Merge User Accounts" feature of the native API works or not but here are the docs: http://guides.dataverse.org/en/4.15/api/native-api.html#merge-accounts-label
Update 1.
On the phoenix server running 2f477c9 , the latest in develop, I just tried merging the user "chestnut" into user "sparrow" and it failed a CommandException.
So this is a case of the phoenix server catching a real regression. You can't merge accounts anymore if you're running the "develop" branch.
curl -H "X-Dataverse-key: $API_TOKEN" -X POST http://localhost:8080/api/users/chestnut/mergeIntoUser/sparrow
{"status":"ERROR","message":"Error calling ChangeUserIdentifierCommand: edu.harvard.iq.dataverse.engine.command.exception.CommandException: Command edu.harvard.iq.dataverse.engine.command.impl.MergeInAccountCommand@6dfcd65c failed: null"}
It's the same error I reported at #5978 (comment)
Caused by: java.lang.IllegalArgumentException: NamedQuery of name: GuestbookResponse.findByAuthenticatedUserId not found.
So I hope that this pull request is a good fix. I added that NamedQuery back in. I don't know why it was removed.