-
Notifications
You must be signed in to change notification settings - Fork 61
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 Phase Tickets API: Route
, Handler
, and Utility Function
#1994
Add Phase Tickets API: Route
, Handler
, and Utility Function
#1994
Conversation
Hi @elraphty, @humansinstitute, @tobi-bams, |
@@ -327,3 +327,17 @@ func (db database) GetBountiesByPhaseUuid(phaseUuid string) []Bounty { | |||
db.db.Model(&Bounty{}).Where("phase_uuid = ?", phaseUuid).Find(&bounties) | |||
return bounties | |||
} | |||
|
|||
func (db database) GetTicketsByPhase(featureUuid string, phaseUuid string) ([]Tickets, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MuhammadUmer44 we are to get tickets by phaseUuid
alone not by phaseUuid
and featureUuid
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no concept currently where we would have phases without a feature so this logic is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MuhammadUmer44 can you resolve this one so we can get it merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@humansinstitute, Sure, I am on it.
return | ||
} | ||
|
||
tickets, err := oh.db.GetTicketsByPhase(featureUuid, phaseUuid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also based on the issue related to this, you are suppose to return only the ticketUuids
and not the entire ticket object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this should have been updated and the approach is corrrect.
Initially I had a design to return uuids and then use a different operation to get all details.
But it makes more sense to just return the whole object in one go whilst we're there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a situation where the description in the ticket was correct but I'd not updated the title which still referenced UUIDs (updated)
return | ||
} | ||
|
||
_, err := oh.db.GetFeaturePhaseByUuid(featureUuid, phaseUuid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You suppose to use this new function GetTicketsByPhase
you just created here and not this function GetFeaturePhaseByUuid
Closing due to conflict with second pull request on same functionality. |
@humansinstitute, I fix conflict |
Describe the changes:
/features/{uuid}/phase/{uuid}/tickets
, handler with authentication, and database utility function with comprehensive test coverage.closes: #1982
closes: #1983
closes: #1984
Issue ticket number and link:
Evidence:
Checklist before requesting a review