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

Add fix for SQL on guestbook service bean #10244

Merged
merged 2 commits into from Jan 19, 2024
Merged

Conversation

jp-tosca
Copy link
Contributor

@jp-tosca jp-tosca commented Jan 18, 2024

What this PR does / why we need it:

Which issue(s) this PR closes:

Closes #10243
Closes #10245

Special notes for your reviewer:
N/A

Suggestions on how to test this:
This happened to me after publishing a new version of a dataset.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
N/A

Is there a release notes update needed for this change?:
N/A

Additional documentation:
N/A

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Looks good.

This comment has been minimized.

@qqmyers
Copy link
Member

qqmyers commented Jan 18, 2024

FWIW: I looked at #9599 and these are the only two places where there's an "and... that occurs right after an id. There are a few more places where there's a multi-line query with one line ending with "\n" followed by + "and..." (see the MetricsServiceBean) but those should be OK.

@qqmyers
Copy link
Member

qqmyers commented Jan 18, 2024

There does appear to be a very old one though that we might want to fix - see

String queryString = "select count(o) from GuestbookResponse as o, Dataset d, DvObject obj where o.dataset_id = d.id and d.id = obj.id and obj.owner_id = " + dataverseId + "and o.guestbook_id = " + guestbookId;

Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:10243-guestbook-sql-fix
ghcr.io/gdcc/configbaker:10243-guestbook-sql-fix

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@landreev landreev self-assigned this Jan 19, 2024
@landreev
Copy link
Contributor

Looking good. I can create datasets in the UI without anything bombing.
Going to merge it without further ado.

@landreev landreev merged commit df318f0 into develop Jan 19, 2024
19 checks passed
@landreev landreev removed their assignment Jan 19, 2024
@cmbz cmbz added the Size: 3 A percentage of a sprint. 2.1 hours. label Jan 19, 2024
@pdurbin pdurbin deleted the 10243-guestbook-sql-fix branch January 26, 2024 22:55
@pdurbin pdurbin added this to the 6.2 milestone Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: 3 A percentage of a sprint. 2.1 hours.
Projects
Status: Done 🧹
5 participants