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

broken kebab on file listing page when dataset out of compliance with new (5.11) terms policy #8742

Closed
qqmyers opened this issue May 25, 2022 · 10 comments · Fixed by #8863
Closed
Milestone

Comments

@qqmyers
Copy link
Member

qqmyers commented May 25, 2022

What steps does it take to reproduce the issue? Publish a dataset with files, try to use the kebob menu to restrict the file. The display looks like
image

and clicking the vertical ... kebab (note there's no down arrow after it) gives:
image

If I edit some metadata so that a draft version exists, the menus change to have a carat after them:
image
and it works as normal.

Which version of Dataverse are you using?
develop branch - doesn't seem to occur on 5.10.1

@mreekie
Copy link

mreekie commented Jul 20, 2022

Jim came accross this while using the software.
This was working previously.
Small

@pdurbin
Copy link
Member

pdurbin commented Jul 25, 2022

@qqmyers I'm on ba0183d (develop) and having trouble reproducing this. My kebabs don't seem to be missing the arrows and I get the normal popup when I go to restrict a file (screenshots below). Any more tips on how to reproduce this?

Screenshot 2022-07-25 at 16-41-00 test

Screenshot 2022-07-25 at 16-42-37 test

@qqmyers
Copy link
Member Author

qqmyers commented Jul 25, 2022

https://demo.dataverse.org/dataset.xhtml?persistentId=doi:10.70122/FK2/CRN2AW shows this issue for me. Not sure if there is something else about it, or develop has had changes that fix it already?

@pdurbin
Copy link
Member

pdurbin commented Jul 25, 2022

Hmm, that "quick test" dataset you also mentioned in #8845 and it doesn't show any versions?!?

Screenshot 2022-07-25 at 16-53-31 Quick Test

Very strange. Maybe you and I can do a quick call to try to reproduce this. I can't reproduce it on demo either.

@qqmyers
Copy link
Member Author

qqmyers commented Jul 25, 2022

Hmm - I see
image

@qqmyers
Copy link
Member Author

qqmyers commented Jul 25, 2022

Ah - the issue is with published datasets that don't have filerequestaccess==true or termsofaccess set. You can no longer produce these, but existing published datasets would have this. (I was able to recreate this by manually setting the filerequestaccess='f' after publication (at QDR which was up-to-date w.r.t. develop as of last week)).

@pdurbin
Copy link
Member

pdurbin commented Jul 27, 2022

I'm able to reproduce this now. I had missed the step or restricting a file. Here are the steps:

  • create a dataset
  • upload at least two files
  • restrict one of the files (accept the defaults, which is "allow access request" check and nothing written in terms.
  • publish
  • Set fileaccessrequest to false. I only have one dataset so I ran update termsofuseandaccess set fileaccessrequest = false;
  • As a sanity check, run scripts/issues/8191/datasets_without_toa_or_request_access from the 5.11 release notes to see that this is now a dataset that's out of compliance. It has no terms and it doesn't allow access requests.
  • Refresh the dataset page. You should see the strange kebab with no dropdown (screenshot below).
  • Try clicking the strange kebab on either file (the restricted one or the non-restricted one). The "This file has already been deleted..." message will appear the moment you click the kebab (screenshot below). Basically, no operations are allowed, not just restrict. Note also that the "Edit Files" button is disabled.

I will say that the "out of compliance" message is prominently featured at the top ("Info – Datasets with restricted files are required to have Request Access enabled or Terms of Access to help people access the data. Please edit the dataset to confirm Request Access or provide Terms of Access to be in compliance with the policy."). So if anyone complains about this problem, it's easy enough to ask them to check for this message. Then, to fix the dataset, they can take the following steps:

  • Click on Terms
  • Click Edit Terms Requirements
  • Note that "Enable access request" is already checked. (Dataverse is nudging them in this direction, by design.) This is a sufficient fix. Or they can fill in "Terms of Access for Restricted Files".
  • Save Changes on the Terms tab.
  • Note that the kebab is fixed and works like normal.
  • In short, the yellow message at the top already tells the user how to fix the dataset.

weird kebab with no dropdown (note also yellow warning at top)

Screen Shot 2022-07-27 at 9 41 40 AM

strange message when you click any weird kebab in the list of files

Screen Shot 2022-07-27 at 9 41 55 AM

@pdurbin
Copy link
Member

pdurbin commented Jul 27, 2022

I'd also like to note that on the file landing page the behavior is similar but not quite the same. Instead of a kebab, there is an "Edit File" button but it is disabled. Since you cannot click this button, there is no "Edit File" popup error like we see on the dataset page (screenshot below). As with the dataset page, the instructions on how to fix the dataset are in yellow at the top.

Screen Shot 2022-07-27 at 10 06 20 AM

@pdurbin
Copy link
Member

pdurbin commented Jul 27, 2022

We just discussed this issue in standup.

In short, the file landing page is working the way we want. The "Edit File" dropdown is disabled when the dataset is non-compliant.

The task is to apply the same logic to the dataset page. Don't let files be edited.

@pdurbin
Copy link
Member

pdurbin commented Jul 27, 2022

There's more strange and disturbing behavior I'm noticing (which I mentioned briefly in #8845 (comment) ).

In short, with fileaccessrequest set to false and no terms as described above ( #8742 (comment) ) the dataset only has one version...

dvndb=> select * from datasetversion;
id | unf | archivalcopylocation | archivenote | archivetime | createtime | deaccessionlink | externalstatuslabel | lastupdatetime | minorversionnumber | releasetime | version | versionnote | versionnumber | versionstate | dataset_id | termsofuseandaccess_id
----+--------------------------------+----------------------+-------------+-------------+------------------------+-----------------+---------------------+-------------------------+--------------------+-------------------------+---------+-------------+---------------+--------------+------------+------------------------
4 | UNF:6:2MMoV8KKO8R7sb27Q5GXtA== | | | | 2022-07-27 14:13:46.99 | | | 2022-07-27 14:13:54.578 | 0 | 2022-07-27 14:13:54.578 | 9 | | 1 | RELEASED | 14 | 4
(1 row)

... but in the UI it looks like two versions (a ghost draft as reported in #8742) and the real version, which is published/released.

From the UI, you are allowed to delete the ghost draft...

Screen Shot 2022-07-27 at 2 15 02 PM

Screen Shot 2022-07-27 at 2 15 16 PM

... and THE PUBLISHED VERSION IS DELETED!

dvndb=> select * from datasetversion;
id | unf | archivalcopylocation | archivenote | archivetime | createtime | deaccessionlink | externalstatuslabel | lastupdatetime | minorversionnumber | releasetime | version | versionnote | versionnumber | versionstate | dataset_id | termsofuseandaccess_id
----+-----+----------------------+-------------+-------------+------------+-----------------+---------------------+----------------+--------------------+-------------+---------+-------------+---------------+--------------+------------+------------------------
(0 rows)

In the UI, you don't get any feedback. It doesn't say "version deleted" or anything. It looks like this...

Screen Shot 2022-07-27 at 2 15 40 PM

... but when you refresh the page, you can tell the published version is gone. (See also "zero rows" from the SQL above.)

Screen Shot 2022-07-27 at 2 16 02 PM

qqmyers added a commit to QualitativeDataRepository/dataverse that referenced this issue Jul 27, 2022
@pdurbin pdurbin changed the title Can't restrict unless a draft version exists broken kebab on file listing page when dataset out of compliance with new (5.11) terms policy Jul 27, 2022
@pdurbin pdurbin removed their assignment Jul 28, 2022
kcondon added a commit that referenced this issue Aug 3, 2022
only render edit files when hasValidTermsOfAccess #8742
@pdurbin pdurbin added this to the 5.12 milestone Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants