Question

Photo of Amber McCoy

0

History Tab Error

I keep getting this error when I click on the History tab: 

Screen Shot 2018-02-12 at 9.30.42 AM.png

I don't know what any of that means.  I saw someone had the same problem about 16 months ago and referenced a link on the slack channel.  I tried to go to that but I can only see the history back to Jan. 30th.  

I'm not sure if this is related or not but last week I changed how our groups were structured and moved several groups to a different level so our group viewer would be cleaner and easier to find the people in the correct areas.  I removed a few groups but made sure that no one was in those groups before I deleted them.  The only attendance we have been tracking so far is I manually go through our connection cards and enter the attendance and the only thing that changed with that group is I changed the parent group name.  

Thank-you!

  • Photo of Daniel Hazelbaker

    0

    That is fine, but why would a "Small Group" ever have a "Serving Team" underneath it?

    The way you have configured your group types, you are trying to specify that a "Small Group" can have a "Serving Team" as a child group.

    You can easily setup the tree structure the way you want without recursive loops in the configuration.

    Here is how I would set it up. First, stop using the "Serving Team" for organizing the tree. That is not what it should be used for. It should be used to identify groups that are serving teams themselves, not for organizing other groups. You will run into reporting issues down the road if you keep trying to use it for things that are not actual serving teams. Second, take your print-out and start marking what group types you want each to be without causing loops. Database systems don't like loops. They break things. For that matter real life doesn't like loops either. You would never have your Exec Pastor report to a part-time staff person. That is a loop, and it doesn't make sense.

    The actual structure you have implemented does not have loops, but when you configured the Group Types you created loops. That is what I am saying, you need to fix those loops.  You simply cannot have A > B > C > A. That doesn't in any way limit you from building the group structure the way you want.

    Screen Shot 2018-02-12 at 3.03.25 PM.png

  • Photo of Daniel Hazelbaker

    0

    Hi Amber,

    That usually occurs when you have accidentally setup a circular loop in your Group Types inheritance settings. i.e. A > B > C > A.  Can you run the query below on your Power Tools SQL page and post an image of the results? It should show any circular references.

    WITH FindRoot AS
    (
    SELECT [Id],[InheritedGroupTypeId], CAST([Id] AS NVARCHAR(MAX)) Path
    FROM [GroupType]

    UNION ALL

    SELECT C.[Id], P.[InheritedGroupTypeId], C.Path + N' > ' + CAST(P.[Id] AS NVARCHAR(MAX))
    FROM [GroupType] P
    JOIN FindRoot C
    ON C.[InheritedGroupTypeId] = P.[Id] AND P.[InheritedGroupTypeId] <> P.[Id] AND C.[InheritedGroupTypeId] <> C.Id
    )
    SELECT *
    FROM FindRoot R
    WHERE R.Id = R.[InheritedGroupTypeId]
    AND R.[InheritedGroupTypeId] <> 0;

  • Photo of Amber McCoy

    0

    It doesn't look like it found anything.  

    Screen Shot 2018-02-12 at 11.44.05 AM.png

  • Photo of Daniel Hazelbaker

    0

    Hmm.  Okay try this one and see if it finds anything (checks a different kind of circular reference):

    WITH TreeCrawler as
    (
    SELECT gta.GroupTypeId, gta.ChildGroupTypeId, 1 AS Depth
    FROM [GroupTypeAssociation] gta

    UNION ALL

    SELECT gta2.GroupTypeId, gta2.ChildGroupTypeId, tc.Depth + 1
    FROM
    [GroupTypeAssociation] gta2
    INNER JOIN TreeCrawler tc ON tc.GroupTypeId = gta2.ChildGroupTypeId
    WHERE tc.Depth < 20 AND gta2.GroupTypeId != gta2.ChildGroupTypeId
    )
    SELECT GroupTypeId, ChildGroupTypeId FROM TreeCrawler tc
    WHERE Depth > 19
    GROUP BY GroupTypeId, ChildGroupTypeId

  • Photo of Amber McCoy

    0

    This is what came up when I ran the second one.  

    Screen Shot 2018-02-12 at 12.29.32 PM.png

  • Photo of Daniel Hazelbaker

    0

    Okay, it looks like you have Group Types 24, 25 and 26 setup "wrong". So lets start there.

    Go to you Admin Tools > General Settings > Group Types. Click on any Group Type, and then in the URL bar of your browser change the "groupTypeId=XX" to "groupTypeId=23" and hit enter. Write down the "Name" of this group type, as we will need it later.

    Now, edit the URL again and change it to "groupTypeId=24". Then expand your "General" section and remove from "Child Group Types" the item with the same name you wrote down above. Save this group type. Then do this same thing for "groupTypeId=25" and "groupTypeId=26"

    Basically, what you have setup currently is Group Type 23 allows child groups of type 25, which allows child groups of type 23 again. This is causing a loop in the system. The above should fix that loop.

    After you make those changes, run that second SQL query again and it should hopefully come back empty. If it still comes back with that "30,23" pair, you might need to do the above change on "groupTypeId=30" as well.

  • Photo of Amber McCoy

    0

    I think I know exactly which groups those are.  When I restructured our groups, I have a General group and a Small Group under a Serving Team group.  When I was adding the Child Group Types, I think I remember adding the same group type to the child group type.  I will do the above and see if those are the same groups.  I'll update shortly. Thanks!

  • Photo of Amber McCoy

    0

    I thought I understood and fixed it but I guess not because now when I run the SQL code again, it keeps timing out.  

    I initially removed the group type from the child group type but when I thought about it, that doesn't make sense so I re-added it.  (example: Under the Serving Team, I have child groups with groups types of Serving Team, Small Group, & General Group).  Under the Small Group, I have child groups that are both small groups and Serving Teams.

    Is that causing the problem?  Having child groups with different group types?  

    23= Serving Team, 24= Small Group Section, 25= Small Group, 26= General Group, 30= Volunteer Check-in

    Here is part of my Group Viewer. Smile faces are Serving Teams, House is Small Groups, People is General Group

    Screen Shot 2018-02-12 at 1.17.11 PM.png



  • Photo of Daniel Hazelbaker

    0

    So what you have, for example in one case, is this "allowed child group types" tree:

    Serving Team > Small Group > Serving Team

    This is not a valid "allowed child group type" tree because it is causing a loop. I can't say for sure, but I think you are using the "Serving Team" group type wrong. That group type is meant to identify groups that serve on the weekend (ushers, for example). It's not meant to be a parent group for various other group types.

    Whatever layout you use, you just have to be sure that you don't have any circular loops like you have now.  If "Serving Team" allows as a child group type "Small Group", then no group type underneath the "Small Group" type can also allow "Serving Team" as a child group type. It's a bug that the UI lets you do this and has been fixed in later versions or Rock.

    Right now, you have all kinds of loops which is what is causing the timeouts.  A "Serving Team" should not have any "Small Groups" under it, because a "Small Group" is something very different than a Serving Team.  Conversely, a "Small Group" should never have a "Serving Team" under it because those are very different things.

    • Amber McCoy

      Instead of having our Ministry Team groups be a "Serving Team", can I change them to a "General Group" then have the various child group types? I included a picture below.

    • Daniel Hazelbaker

      That is what I would recommend, but that won't change the problem. The problem is the Group Type configuration you created allows loops. That has to be fixed. It has nothing to do with how you have structured the group tree, because I don't see you actually using loops.

  • Photo of Amber McCoy

    0

    We were trying to make the structure of the groups simple and easy to see everything that each area has.  I've attached a quick print-out of the Groups and their hierarchy. I also have them color coded by group type.  

    Our areas are called Ministry Teams (Serving Teams). 

    The first area that has a different child group is Grace Connect.  Grace Connect is our Connections serving Team, all of the yellow teams are Serving Teams that fall under the Connections department.  The pink "Thank you card group" is a group of people who we as a staff have sent a card to during our weekly meeting.  This is a general group because the people in this group aren't serving under the Grace Connect (well some of them are but not as a part of this group).  

    The next area is our Grace Groups- this is more than just small groups (we have a "Groups Director" because she oversees other groups of people, not just the small groups.  More of like a community type group director).  So the Grace Groups Leadership Team is a serving team that helps facilitate different groups in our church and also helps with the vision of new groups.  Then all of the Small Groups fall under the Grace Groups area.

    Ministry Teams.jpg 

    I 100% understand about the different roles that the various groups have, which is why I was so excited to see that we could add a different child group type.  If we are now not allowed to do this, how can I set up our groups so the various areas fall under the correct group like they do IRL?  We were also trying to make it simple- if you were looking for something in the Kidz department, you could click on Grace Kidz and see the serving teams, small groups (those aren't in yet), registration groups, camps, etc.  

  • Photo of Amber McCoy

    0

    Ok, So I will remove the Ministry Team level all together and start with the actual Teams.  Can I set it up like this and have different group types under general groups.  Or will this still create a loop?

    Grace Connect <Top level general group>

    •     Serving Teams <2nd level Serving Group>
      • Cafe
      • Greeters
      • Hosts
    • General Group <2nd level General Group>
      • Thank you card group

    Grace Groups

    • Serving Teams
      • Leadership Team
      • Section Communities
    • Small Groups
      • Bigalow Group
      • Deverick Group
      • Smith Group
    • Daniel Hazelbaker

      You are showing your Group structure, but that is not the problem. The problem is your Group Type structure. You need to look at your Group Types and make sure there are no loops in the Group Types. While they are related, they are very very different things. Forgot about the "Groups" page and go to your General Settings, Group Types and look at those group types we originally talked about. None of those can cause a loop in their relations to each other, and right now they do.

    • Amber McCoy

      Would this still cause a loop?
      General Group
      >Serving Group
      =Serving Group
      =Serving Group
      =Serving Group
      >General Group
      =General Group
      General Group
      >Small Group
      =Small Group
      =Small Group
      =Small Group
      > Serving Group
      =Serving Group

    • Daniel Hazelbaker

      Somehow the formatting on that didn't come through too well. :) Using those 3 types, I'm assuming you mean "General Group" would have child group type of "Serving Group" and "Small Group". That would be fine as long as neither "Serving Group" nor "Small Group" are configured to allow a child group type of "General Group".

    • Amber McCoy

      Ugh- sorry, I’m on my iPad now so I’m not sure if that messed up the formatting but yes, I think that is correct.

      General Group - top level
      Serving Group- 1st child group to top level general group
      Serving Group - child to 1st child group
      Serving Group-child to 1st child group
      General Group - 2nd child group to Top Level general group
      General Group- child to 2nd child group


      General Group- Top level general group 2
      Serving Group - 1st child to top level general group 2
      Serving Group- child to 1st child group
      Serving Group- child to 1st child group
      Small Group- 2nd child group to top level general group 2
      Small group- child to 2nd child group
      Small group- child to 2nd child group
      General Group - 3rd child group to top level general group 2
      General group- child to 3rd child group

  • Photo of Amber McCoy

    0

    • General Group - top level
      • Serving Group- 1st child group to top level general group
        • Serving Group - child to 1st child group
        • Serving Group-child to 1st child group
      • General Group - 2nd child group to Top Level general group
        • General Group- child to 2nd child group
    • General Group- Top level general group 2
      • Serving Group - 1st child to top level general group 2
        • Serving Group- child to 1st child group
        • Serving Group- child to 1st child group
      • Small Group- 2nd child group to top level general group 2
        • Small group- child to 2nd child group
        • Small group- child to 2nd child group
      • General Group - 3rd child group to top level general group 2
        • General group- child to 3rd child group