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

get "merge accounts" working again #5978 #5980

Merged
merged 1 commit into from
Jul 10, 2019
Merged

Conversation

pdurbin
Copy link
Member

@pdurbin pdurbin commented Jun 27, 2019

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.

Screen Shot 2019-06-27 at 3 22 37 PM

Screen Shot 2019-06-27 at 3 23 22 PM

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.

@kcondon kcondon self-assigned this Jul 8, 2019
@kcondon
Copy link
Contributor

kcondon commented Jul 8, 2019

Tested, works.

@djbrooke djbrooke added this to the 4.15.1 milestone Jul 10, 2019
@kcondon kcondon merged commit 11eba29 into develop Jul 10, 2019
@kcondon kcondon deleted the 5978-merge-accounts-broken branch July 10, 2019 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants