dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Ordering subfields while displaying dataset version differences

Open luddaniel opened this issue 1 year ago • 6 comments

What this PR does / why we need it:

Ordering subfields while displaying dataset version differences

Which issue(s) this PR closes:

  • Closes #10968

Special notes for your reviewer:

This code looks NullPointerException safe so I didn't overprotect it.

Suggestions on how to test this:

Create multiple versions by modifying the subfields each time and checking the operation with the comparison pop-up.

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

Before: Screenshot from 2024-10-25 15-42-39

After: Screenshot from 2024-10-25 16-08-02

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

yes

luddaniel avatar Oct 25 '24 15:10 luddaniel

Coverage Status

coverage: 20.878% (-0.003%) from 20.881% when pulling b3147a083d140b6a9a2feea21aa043621f692fcc on Recherche-Data-Gouv:10968-order-subfields-version-difference into 03538f0ddba10bc77517dfe78ef70bbc3f978984 on IQSS:develop.

coveralls avatar Oct 25 '24 15:10 coveralls

@luddaniel thanks for the PR! Any idea why we are seeing has this error?

org.opentest4j.AssertionFailedError: expected: <8> but was: <7>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
	at edu.harvard.iq.dataverse.api.HarvestingClientsIT.harvestingClientRun(HarvestingClientsIT.java:301)

pdurbin avatar Oct 25 '24 17:10 pdurbin

It's very unlikely, for anything in this PR to cause that test to fail. It is known to be a little flaky - let me take a quick look. I also kicked off Jenkins to run one more time.

landreev avatar Oct 25 '24 17:10 landreev

(seeing how Jenkins tests did succeed once earlier today, on the same branch minus the release note, I am not too worried about it)

landreev avatar Oct 25 '24 18:10 landreev

It has just passed again (build #3). Somebody, merge it please before it breaks again.

landreev avatar Oct 25 '24 18:10 landreev

Ha, well, I did put it in our new "ready for triage" column which we now look at as a team on Tuesdays, I believe.

It looks like there's the potential for merge conflicts with this PR:

  • #10945

pdurbin avatar Oct 25 '24 20:10 pdurbin

@luddaniel After pushing the fix to Internal and testing it, I noticed that the issue is still observed. See screenshots along with test steps below:

image image

Test Steps:

  1. Go to https://dataverse-internal.iq.harvard.edu/
  2. Create new dataset and populate required fields.
  3. Populate Keyword section with data below (see screenshot) image
  4. Save and publish data set
  5. Edit Metadata for dataset and add two more terms (see screenshot below) image
  6. Save the dataset then go to versions tab
  7. For the Dataset Version Draft, click on view details under summary

ofahimIQSS avatar Nov 05 '24 20:11 ofahimIQSS

Hi @ofahimIQSS Maybe my eyes trick me but it looks to work as expected :)

luddaniel avatar Nov 06 '24 08:11 luddaniel

Merging PR - Testing Passed. Testing of 10969.docx

@luddaniel Thank you!

ofahimIQSS avatar Nov 06 '24 12:11 ofahimIQSS