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

Deleting first Group and Organization custom field is not possible #4094

Closed
gocemitevski opened this issue Mar 9, 2018 · 2 comments · Fixed by #4100
Closed

Deleting first Group and Organization custom field is not possible #4094

gocemitevski opened this issue Mar 9, 2018 · 2 comments · Fixed by #4100
Assignees

Comments

@gocemitevski
Copy link
Contributor

gocemitevski commented Mar 9, 2018

CKAN Version if known (or site URL)

2.6+

Please describe the expected behaviour

Each Group or Organization custom field marked for deletion should be deleted once the Update button is clicked. The deletion button should be displayed as a red button with an icon.

Please describe the actual behaviour

Whey you try to delete the first Group or Organization custom field, it only gets deleted when there are at least two custom fields set. When you try to delete the first custom field, when it's the only one in the group with paired values added, it does not get deleted once the Update button is clicked.

Also the delete icon is not rendered in < 2.8 and it's displayed as a simple checkbox.

What steps can be taken to reproduce the issue?

Navigate to any of the links above and mark the first custom field for deletion, then click Update. The field will not be deleted. Then add values to at least two custom fields, Update and mark the first one for deletion. When you click on Update again, it will be deleted.

Also, note that the delete icon is not rendered and only a simple checkbox is shown for marking.

The custom fields functionality is fully working for datasets, so please check the Manage dataset page for reference.

@Engerrs
Copy link
Member

Engerrs commented Mar 9, 2018

I confirm that this deletion issue exists and I've created a fix for that, PR to master is added.
Tested on CKAN 2.6.4 and master branch for Orgs and Groups.
Hi @tino097 , I heard that you are working on Orgs controller updates for new release, so you might need this fix to be added to your updates.
Can this be backported to CKAN 2.6 and CKAN 2.5, thanks.

@Engerrs
Copy link
Member

Engerrs commented Mar 9, 2018

Also I want to mention, that first two links added at the description are throwing Eternal Server Error, when I'm trying to open them (authorized user and anonymous), but they should throw at least 403 Forbidden:
https://demo.ckan.org/organization/edit/20171207_mk
https://demo.ckan.org/group/edit/16848646846

tino097 pushed a commit that referenced this issue Mar 15, 2018
…deletion

[#4094] Update Orgs/Groups logic for custom fields delete and update
tino097 pushed a commit that referenced this issue Mar 15, 2018
…deletion

[#4094] Update Orgs/Groups logic for custom fields delete and update
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