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

Style summary is pulling old styles instead of gearstyles #55

Closed
brendanheywood opened this issue May 23, 2011 · 5 comments
Closed

Style summary is pulling old styles instead of gearstyles #55

brendanheywood opened this issue May 23, 2011 · 5 comments
Assignees
Labels
2: Bug fix Feature that does not work as intended, broken UI, problem that detract from normal user experience

Comments

@brendanheywood
Copy link
Member

Eg:

http://www.thecrag.com/area/12018019/guide

In the style summary says:

Sport,?

Even though every climb correctly has 'Sport' as the style. There are some projects which have an unknown grade style in the old system.

@ghost ghost assigned scd Jun 22, 2011
@brendanheywood
Copy link
Member Author

A simpler more concrete example:

www.thecrag.com/area/109454040/guide/json

the api spits out:

  "styles" : [
     {
        "style" : "Sport",
        "total" : "1"
     },
     {
        "style" : "Unknown",
        "total" : 1
     }

It should spit out:

 "styles" : [
     {
        "style" : "Sport",
        "total" : "2"
     }
  ]

@scd
Copy link
Member

scd commented Jun 29, 2011

It looks like the incremental statistics did not propagate up the ancestor heirarchy correctly. I could not find the reason why this occurred.

Effectively the parent node did not get the signal that a child node had changed it's style status.

In this instance it was easy to fix, I just baselined the statistics for a particular node, reset the cache and it fixed itself.

I went through the process of updating route styles in my dev system and it updated the statistics correctly. There is probably some unusual user interactions with creating and updating routes which causes the statistics failure, but I could not find it during this round of testing.

Because it has got nothing to do with old gear styles, and the database is now good, I'm going to close this issue.

Do we want to create another 'watching brief' issue for gear style statistics not being updated? I'm thinking we wait until it occurs again.

@scd scd closed this as completed Jun 29, 2011
@brendanheywood
Copy link
Member Author

Ah!

I didn't realized you touched the styleSummary template which translates 'unknown' into 'Sport or Trad'

I think that is where my confusion is coming from.

There is some inconsistency as in some places it appears as 'Unknown' in others as '?' and in others as 'Sport or Trad'. I vaguely recall the conversation about this.

the problem that arises with the swap from unknown to 'Sport or Trad' is if the area also actually has Sport and/or trad as well. You can get stuff like this:

'Trad and Sport or Trad'

So I don't think this has anything to do with gear styles vs grade styles and was just masking the fix of the real issue.

@scd
Copy link
Member

scd commented Jun 29, 2011

We really only need the translation for the higher levels of the index (say if there are more than 1000 routes). The translation is hiding some poor data, which we really don't want to do below the crag level.

@brendanheywood
Copy link
Member Author

Ok I just implemented this and I think it is a little weird. Say in NSW we have a whole bunch of crags, some are areas with more than 1000 routes and some are less. So some say 'All unknown' and others say 'All Trad or Sport'. I tried setting the cuttoff to 100 instead of 1000 and it still looks weird. It's currently at 50 which works ok, we can tune this more as we go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Bug fix Feature that does not work as intended, broken UI, problem that detract from normal user experience
Projects
None yet
Development

No branches or pull requests

2 participants