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

Fixed parent orgs not updating children orgs [#135366883] #802

Merged
merged 2 commits into from Dec 9, 2016

Conversation

BigChiefSmidgeums
Copy link
Contributor

No description provided.

@@ -107,6 +107,7 @@ def process_ssrs_parent
end

def update_ssr_org_name
self.org_children.each{ |org| org.update_ssr_org_name }
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can do this a little more efficiently. I think this would do the same thing as both lines.

SubServiceRequest.where(organization: self.all_child_organizations).each(:&update_org_tree)

Copy link
Contributor

Choose a reason for hiding this comment

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

all_child_organizations will fetch every descendant of self, while org_children only returns immediate children. @BigChiefSmidgeums which should it be?

@jleonardw9 jleonardw9 merged commit ca279f5 into master Dec 9, 2016
@jleonardw9 jleonardw9 deleted the jtm_org_tree_update_bug branch December 9, 2016 13:33
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

4 participants