[RESOLVED]Sort by Release Date...

Started by Wajo357, January 10, 2013, 02:32:09 AM

previous topic - next topic
Go Down

Wajo357

January 10, 2013, 02:32:09 AM Last Edit: January 11, 2013, 09:39:22 AM by shmax
http://shmax.com/database/2819?sort=release_date

Oct 25th 2012 is shown first, then 'Upcoming' and then the normal sorting behavior I was expecting. The first one threw me for a loop...
<a href="http://www.shmax.com/img/sigs/signature.swf?user_id=853" target="_blank" class="new_win">http://www.shmax.com/img/sigs/signature.swf?user_id=853</a>

engledogg

It's because of the Canada(?) release info.  (I know these 3rd party companies are located all over the world, but looking at the rest of the Knight Morpher category, Canada does pop up here and there in the release info of the other items.  Not sure if that's a typo or not...I'll admit that I have little to do with 3rd party items on the site, so hopefully someone that knows better can chime in.)

I've noticed that whenever an item has more than one release associated with it, and one of them is still "upcoming", the record, as a whole, gets dumped into "upcoming" display status.

If possible, I would think that if as long as the product got released somewhere it could be removed from the "upcoming" status, even if there were other countries in which it has a planned, but yet to be observed, release.

Can we do something like that, shmax?

MIKE
engledogg
Dumba$$ that used to buy everything...not so much anymore.

Antron007

Edogg,
Are you sure that's why? I've had this problem on either my view or edit collection page (can't remember which) for a little while now. I had agreed with Max about not worrying about it until the new page rolls out.

Granted, mine could be an entirely different issue but the symptoms are the same. 

engledogg

Pretty sure that's what is causing it in this case. 

Go here:
http://www.shmax.com/database/1?r=0&sort=release_date&sort_dir=1&date_after=today

and scroll down a bit until you hit 005 Autobot Ratchet Lunar Crawler. 

The Australia release info is still labeled as "upcoming", which causes the Autobot Ratchet Lunar Crawler to show up on the recent release page, even though it was released in the U.S. in July of 2011. 

On a related note, anyone that can provide accurate release info for stuff like this, even if it turns out that it was NEVER released in Australia, feel free to submit that information.

MIKE
engledogg
Dumba$$ that used to buy everything...not so much anymore.

shmax

I won't be able to finish my fix until after work, but what's happening is that the sort separator is getting confused because you are sorting by descending release date, but when a sort separator is selected for a "release" sort it always chooses the first of the release dates for an item, which is internally sorted in ascending order. So, all I need to do is take the last release row instead of the first when creating the sort separator, and I think that'll fix it. More tonight. Thanks, guys.

shmax

Should be working better, now. What do you think?

Antron007

Seems to be good now.

Wajo357

I'm still seeing KM-05 first with a release date of Oct 25th. I'm using the same link as above...
<a href="http://www.shmax.com/img/sigs/signature.swf?user_id=853" target="_blank" class="new_win">http://www.shmax.com/img/sigs/signature.swf?user_id=853</a>

engledogg

#8
January 11, 2013, 06:54:53 AM Last Edit: January 11, 2013, 07:17:45 AM by engledogg
It's because of the Upcoming Canadian release...right?

Sorta like what is seen here:

http://shmax.com/database/2417?sort=release_date

Only the May 16th-release items behave "properly" (no Australian "upcoming" statuses).

MIKE
engledogg
Dumba$$ that used to buy everything...not so much anymore.

shmax


It's because of the Upcoming Canadian release...right?

Sorta like what is seen here:

http://shmax.com/database/2417?sort=release_date

Only the May 16th-release items behave "properly" (no Australian "upcoming" statuses).

MIKE
engledogg


Yep. What I fixed was the sort separators getting confused. If you feel that the sorting itself should work in a different way then we can tackle that next. The way "release date" sort works is that a row is selected from the database for every release, joined to the product, and then grouped by sku id (so that you only see each sku displayed once). When the grouping operation happens, the item at the top of the list in that group "wins". So that explains why the "upcoming" items are at the top of the list when you sort by "newest" order, even if they have already been released in some other country already.

If you have different ideas lemme know.

Tripredacus

Was looking at this search, and found a little labelling thing (no biggie) and before posting in this thread I figured I'd sort by release date.
http://www.shmax.com/results/1?browse=0&s=mastermind&sort=release_date.d

The R-01 Terminus Hexatron says "Released April 2013" which should technically still say "upcoming April 2013" (this is the labelling bug)... but since it is sorted now, for some reason the next item down in the list is older than the R-01, as well as older than the 2 items before it, KM-03X and KM-06.

engledogg

It's because of the "upcoming" status on Air Screech, like we were talking about above. Even though it was released in Oct 2012 in Hong Kong, it still has the "upcoming" status associated with it and, like shmax said, the system will sort it like that. 

I guess I would be in the camp of "it was released somewhere, go with that date when sorting", but then I thought about all the U.S. stuff that Malaysia, Singapore, etc. gets first, which could affect sorting when looking at U.S. portions of the database. 

As far as released vs. upcoming...if something is supplied a date, any date, I'm assuming that it instantly gets the "released" treatment, even if the date is in the future.  The only time you'll see "upcoming" is when there is no date supplied. 

I guess it would be possible to use "upcoming" for both when a future date is supplied or when it is unknown, but I have no idea how much work would be involved, though.

MIKE
engledogg
Dumba$$ that used to buy everything...not so much anymore.

Go Up