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

Curator should be able to edit a Dataset that is "In Review" #4139

Closed
sekmiller opened this issue Sep 18, 2017 · 22 comments
Closed

Curator should be able to edit a Dataset that is "In Review" #4139

sekmiller opened this issue Sep 18, 2017 · 22 comments

Comments

@sekmiller
Copy link
Contributor

sekmiller commented Sep 18, 2017

When "In Review" was not considered to be a lock in the same way that File Ingest was a lock(versions prior to the lock redesign), a curator (or someone with dataset publish and edit permission) could edit a dataset that was "In Review". (That is, the edit dataset button was not disabled for them.)

To fix the disabled tag on the edit dataset button so that if the lock reason is in review disabled is false for users with Publish Dataset permission.

@tlchristian
Copy link

For administrators, the edit and bulk download is disabled. Curators no longer can see the "in review" datasets. Not sure why this is, but doesn't seem to work for data curation workflows.

@sbarbosadataverse
Copy link

Admins/curators should be the only ones with the ability to edit a dataset after it's been submitted for review

Changing as I described above would correct the workflow for Harvard's installation.

@pdurbin
Copy link
Member

pdurbin commented Oct 13, 2017

@pameyer previously you were commenting on #3172 for work in this area, I believe. At this point I think that issue can be closed.

@pdurbin
Copy link
Member

pdurbin commented Oct 13, 2017

Here are my notes from sprint planning on Wednesday afternoon:

"In the command, check for a lock but override and allow editing if user has edit permission and publish permission." I believe someone said it was a certain kind of lock to check for.

pdurbin added a commit that referenced this issue Oct 13, 2017
I'm not sure when this was fixed. Probably 4.8.
@pdurbin
Copy link
Member

pdurbin commented Oct 13, 2017

In 1f1a79e I added an API test to assert the current behavior. A curator can't edit a dataset because it's locked. Oddly, however, the check for a lock is in the SWORD code. I thought the check for a lock would be in the UpdateDatasetCommand. I discussed this with @sekmiller and will keep looking.

pdurbin added a commit that referenced this issue Oct 16, 2017
Authors should not be able to edit metadata while in review. The GUI
disallows this as of Dataverse 4.8 but it was not fully implemented
because authors can make edits via the native API.

Also add a sample JSON file for making edits for progress toward
closing #3777 some day.
@pdurbin
Copy link
Member

pdurbin commented Oct 16, 2017

As I mentioned at standup this morning, I added some tests in 445e1ed that (unfortunately) assert that authors can continue to edit metadata while datasets are in review if the native API is used (heads up to @pameyer about this). I was told that @michbarsinai probably implemented the new logic that prevents authors from editing metadata via GUI so it was probably added in pull request #4116. If there was an issue about preventing authors from editing datasets while in review, I can't find it. Perhaps it's #3172 but it was never put through QA due to scope creep.

@pdurbin
Copy link
Member

pdurbin commented Oct 16, 2017

In 830fd97 I took a look at the Edit button on the dataset page and made it so that people who can publish can still edit the metadata. However, it's a confusing user experience for these people who are editing metadata while it's in review because you see both of these messages at once:

  • Success! – The metadata for this dataset has been updated.
  • Dataset Locked This dataset has been submitted for review.

Here's a screenshot:

screen shot 2017-10-16 at 1 53 05 pm

I'm going to flag this for UI/UX attention and try to pull in @mheppler @TaniaSchlatter @dlmurphy or @jggautier . Please note that #3172 is highly related.

Even more problematic than the above is that the rendering of that button is the only thing that's preventing authors from editing metadata. That is to say, if I put a hack in to make is so authors can click the Edit button, authors are also able to edit the metadata just like curators. This makes sense because as I reported in my last comment, in Dataverse 4.8 and 4.8.1 authors are allowed to edit metadata via API but not the GUI.

@djbrooke I could use help with the definition of done on this issue. I feel like a stab was made at #3172 but the job was never quite finished. This issue no longer feels like a 3. Please advise.

@pdurbin pdurbin added the UX & UI: Design This issue needs input on the design of the UI and from the product owner label Oct 16, 2017
pdurbin added a commit that referenced this issue Oct 16, 2017
@pdurbin
Copy link
Member

pdurbin commented Oct 16, 2017

I just created pull request #4208 and am putting this issue into Code Review at https://waffle.io/IQSS/dataverse

Authors are now prevented from editing metadata at the command level. Somewhat strangely to me, the native API and the GUI use different commands.

If I made a small revision to the API Guide I could put #3777 through QA as well since I was testing metadata edits via the native API (and added a convenience method for testing the API via REST Assured).

@djbrooke djbrooke added this to the 4.8.2 - Updated Dataset Locking milestone Oct 19, 2017
@kcondon kcondon self-assigned this Oct 24, 2017
@kcondon
Copy link
Contributor

kcondon commented Oct 30, 2017

Issues:
[x] Once dataset is submitted, contributor can download individual files but not download all.
[x] Once dataset is submitted, add+edit metadata button on file landing page is not grayed out for contributor (but correctly does nothing)
[x] Once dataset is submitted, edit terms requirements is disabled for curator.
[x] Ingest in progress notice does not disappear, spinner continues periodically until page refresh, if upload tabular file as curator while in review. Works when not in review (this seems different than #3491 since in progress was removed in that ticket, only explore button did not appear).
[x] Minor UI: batch edit select list works but contents is grayed out when curator and dataset is in review.
[x] Set thumbnail for image file not working, changes image to default icon.
[x] Ingest spinner runs during in review for curator, even when nothing new/ingestible was uploaded. Some extra logging every time spinner runs and spinner never goes away even when an ingest finishes.
[ ] Spinner happens a couple times after page load when curator and dataset in review even without a file ingesting

@sekmiller
Copy link
Contributor Author

All of the issues above have been addressed in my latest check-in except for the second one and the ingest spinner thing.
Mike is taking a look at why disabling the button does not gray it out.

@djbrooke
Copy link
Contributor

djbrooke commented Nov 1, 2017

Nice! Thanks @mheppler and @sekmiller!

@mheppler
Copy link
Contributor

mheppler commented Nov 1, 2017

Gave @sekmiller a code snippet to render a disable style class into the h:outputLink.

@kcondon
Copy link
Contributor

kcondon commented Nov 1, 2017

OK, I've retested the fixes and updated the list above. Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants