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 owner to organization detail response #290

Merged
merged 2 commits into from Mar 9, 2023
Merged

Add owner to organization detail response #290

merged 2 commits into from Mar 9, 2023

Conversation

pdeziel
Copy link
Contributor

@pdeziel pdeziel commented Mar 9, 2023

Scope of changes

This adds the owner name to organization detail response in Tenant so that Beacon can display it along with the other organization data.

Fixes SC-14813

Type of change

  • new feature
  • bug fix
  • documentation
  • testing
  • technical debt
  • other (describe)

Acceptance criteria

Owner name should be added to the org detail response, or an empty string if the owner can't be retrieved.

Author checklist

  • I have manually tested the change and/or added automation in the form of unit tests or integration tests
  • I have updated the dependencies list
  • I have recompiled and included new protocol buffers to reflect changes I made
  • I have added new test fixtures as needed to support added tests
  • Check this box if a reviewer can merge this pull request after approval (leave it unchecked if you want to do it yourself)
  • I have moved the associated Shortcut story to "Ready for Review"

Reviewer(s) checklist

  • Any new user-facing content that has been added for this PR has been QA'ed to ensure correct grammar, spelling, and understandability.
  • Are there any TODOs in this PR that should be turned into stories?

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #14813: Return owner in organization detail.

@pdeziel pdeziel requested a review from pdamodaran March 9, 2023 20:11
// Get the organization owner
if out.Owner, err = getOwner(ctx, org); err != nil {
log.Error().Err(err).Str("org", org.ID.String()).Msg("could not retrieve organization owner")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

An organization not having an owner should probably not happen so we want to know about it. However, I don't think returning an error to the user is necessary (it just blocks the user from being able to view the rest of the organization record). Let me know what you think about that.

Copy link
Contributor

Choose a reason for hiding this comment

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

agreed

Copy link
Contributor

@pdamodaran pdamodaran left a comment

Choose a reason for hiding this comment

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

approved @pdeziel

// Get the organization owner
if out.Owner, err = getOwner(ctx, org); err != nil {
log.Error().Err(err).Str("org", org.ID.String()).Msg("could not retrieve organization owner")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

agreed

@pdeziel pdeziel merged commit ac293a7 into main Mar 9, 2023
@pdeziel pdeziel deleted the sc-14813 branch March 9, 2023 21:02
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 this pull request may close these issues.

None yet

2 participants