Skip to content

BI-2379 - Create Delete Endpoint for Deltabreed Sample Controller#440

Merged
nickpalladino merged 14 commits intodevelopfrom
feature/BI-2379
Feb 13, 2025
Merged

BI-2379 - Create Delete Endpoint for Deltabreed Sample Controller#440
nickpalladino merged 14 commits intodevelopfrom
feature/BI-2379

Conversation

@nickpalladino
Copy link
Member

@nickpalladino nickpalladino commented Jan 9, 2025

Description

Story: BI-2379

  • Added endpoint in bi-api for deleting a sample submission

Dependencies

Testing

Change submission status in UI as needed to test different acceptance criteria as listed below:

GIVEN a DELETE programs/{programId}/submissions/{submissionId} request
WHEN the sample submission specified has a submission status of NOT SUBMITTED
THEN the sample submission is deleted (submission, samples, and plates)

GIVEN a DELETE programs/{programId}/submissions/{submissionId} request
WHEN the sample specified has a submission status of SUBMITTED or COMPLETED regardless of hard query parameter value
THEN the sample is not deleted and an error code of 405 is returned.

GIVEN a submission has been deleted
WHEN a new submission with the same name as a previously deleted submission is created
THEN it should be created without error (names can be reused)

The UI component of this work is not yet completed so api calls will need to be made manually. The request URL will look like:

DELETE http://localhost:8081/v1/programs/{programId}/submissions/{submissionId}

The programId and submissionId values can be grabbed from the browser path when navigated to the submission in question.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <please include a link to TAF run>

Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

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

Tested, working. Approved, minor changes suggested.

* Deletes the bidb submission record and BrAPI samples & plates
* @param programId bi-api id of program
* @param submissionId bi-api id of submission
* @return
Copy link
Contributor

Choose a reason for hiding this comment

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

Specify return value or remove that line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed changes

…vice.java

Co-authored-by: mlm483 <128052931+mlm483@users.noreply.github.com>
Copy link
Contributor

@davedrp davedrp left a comment

Choose a reason for hiding this comment

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

Test passed

@nickpalladino nickpalladino merged commit eab67a0 into develop Feb 13, 2025
1 check passed
@nickpalladino nickpalladino deleted the feature/BI-2379 branch February 13, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants