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 an Add and Delete tree ranks option #4257

Merged
merged 110 commits into from
May 22, 2024
Merged

Conversation

acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Dec 5, 2023

Fixes #598

Checklist

  • Self-review the PR after opening it to make sure the changes look good
    and self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Open a tree

  • Click on the plus icon in the header, located between the pencil and the first rank (Planet | Earth | Root | ...)

  • Choose a parent rank

  • Click continue

  • Define the proprieties of your new rank

  • save

  • verify that the new node has been added into the tree ranks

  • Open a tree

  • Click on the pencil icon in the header, located at the front of the headers, before the first rank (Planet | Earth | Root | ...)

  • Click on a pencil next to a tree rank

  • Click delete

  • Confirm deletion

  • verify that the new node has been deleted from the tree ranks

@acwhite211 acwhite211 self-assigned this Dec 5, 2023
@acwhite211 acwhite211 added the 2 - API Issues that are related to the APIs label Dec 5, 2023
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

excited to finally have this coming to sp7!
just hoping there isn't some dark magic/special logic going on in sp6 that we may be missing here

specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
@CarolineDenis CarolineDenis linked an issue Dec 20, 2023 that may be closed by this pull request
@grantfitzsimmons grantfitzsimmons linked an issue Dec 20, 2023 that may be closed by this pull request
@melton-jason melton-jason added this to the 7.9.5 milestone Jan 17, 2024
@CarolineDenis CarolineDenis modified the milestones: 7.9.5, 7.9.6 Mar 13, 2024
@CarolineDenis CarolineDenis changed the title API to add and delete tree ranks Add an Add and Delete tree ranks option Mar 14, 2024
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

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

back-end endpoints are overcomplicated

specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_views.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

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

Testing instructions

  • Open a tree

  • Click on the plus icon in the header, located between the pencil and the first rank (Planet | Earth | Root | ...)

  • Choose a parent rank

  • Click continue

  • Define the proprieties of your new rank

  • save

  • verify that the new node has been added into the tree ranks

  • Open a tree

  • Click on the pencil icon in the header, located at the front of the headers, before the first rank (Planet | Earth | Root | ...)

  • Click on a pencil next to a tree rank

  • Click delete

  • Confirm deletion

  • verify that the new node has been deleted from the tree ranks


Deletion Blocker looks great!

Uja5aN07nf.mp4

@emenslin emenslin requested a review from a team May 16, 2024 20:16
Copy link

@Areyes42 Areyes42 left a comment

Choose a reason for hiding this comment

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

Testing instructions

  • Open a tree

  • Click on the plus icon in the header, located between the pencil and the first rank (Planet | Earth | Root | ...)

  • Choose a parent rank

  • Click continue

  • Define the proprieties of your new rank

  • save

  • verify that the new node has been added into the tree ranks

  • Open a tree

  • Click on the pencil icon in the header, located at the front of the headers, before the first rank (Planet | Earth | Root | ...)

  • Click on a pencil next to a tree rank

  • Click delete

  • Confirm deletion

  • verify that the new node has been deleted from the tree ranks


Adding and deleting works as expected and the deletion blocker shows up, great job!

Screenshot 2024-05-16 at 4 00 43 PM

Copy link
Collaborator

@realVinayak realVinayak left a comment

Choose a reason for hiding this comment

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

just some minor changes, except the parent query. I don't personally think it is necessary (you can get the parent directly) so searching by name is redundant, Am i misunderstanding something?

specifyweb/specify/tree_ranks.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_ranks.py Outdated Show resolved Hide resolved
specifyweb/specify/views.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_ranks.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_ranks.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_ranks.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_ranks.py Outdated Show resolved Hide resolved
specifyweb/specify/tree_ranks.py Outdated Show resolved Hide resolved
@acwhite211 acwhite211 merged commit f78e9b1 into production May 22, 2024
9 checks passed
@acwhite211 acwhite211 deleted the add_delete_tree_rank_api branch May 22, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - Trees Issues that are related to the tree system and related functionalities.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add ability to add or delete a tree rank Add support for customizing tree definitions
7 participants