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

"Create filter and sorting logic and query statements for projects" task #57

Open
markchen25 opened this issue Oct 30, 2011 · 9 comments

Comments

@markchen25
Copy link
Member

@jedimdan,

For the sorting of projects and developers, Kenneth has agreed with Chris on how to sort project. You can check with him.
For the filtering, there's a $filter and $orderBy service which you can easily call.
As for the query statements, I do not think it's very complex. So is it ok if I lower the points to 1 or 2?

@kennethkok
Copy link
Member

Sorting of....

Projects list
by the total number of iterations the owner has accepted
(e.g sortby owner.getAcceptedIterations() descending)

Bids for a project
by total earnings of student
(e.g sortby student.getLifetimeEarnings() descending)

Developers list
by last login time, if tied, then sort the ties by total earnings of student
(e.g sortby student.getLastLogin() )

School
by total earnings of developers in school
(e.g sortby sum( if(student.getSchool()="school"){
student.getLifetimeEarnings() } ) )

Country
by total earnings of developers in country
(e.g sortby sum( if(student.getCountry()="country"){
student.getLifetimeEarnings() } ) )

hope this helps, call me for more info :)

On Sun, Oct 30, 2011 at 11:54 PM, Mark Chen <
[email protected]>wrote:

@jedimdan,

For the sorting of projects and developers, Kenneth has agreed with Chris
on how to sort project. You can check with him.
For the filtering, there's a $filter and $orderBy service which you can
easily call.
As for the query statements, I do not think it's very complex. So is it ok
if I lower the points to 1 or 2?

Reply to this email directly or view it on GitHub:
#57

@jedimdan
Copy link
Member

We can't use filter and sort in angular cos it will only apply on the
data for that page, which makes it pointless. It needs to happen on
the back end.

@jedimdan
Copy link
Member

Queries are a lot harder than you think because a search isn't as
simple as saying select *. You need to make sure that you search every
field, and every word, whether middle, end or start of a sentence, and
if it's two words, you need to allow the search to be fluid to say
search all word a and search all word b then search both combined and
both but separate. I gave up in the end and went to find a library to
provide proper searching.

@kennethkok
Copy link
Member

in that case, do u need us to revise the way we sort our tables with chris?

On Mon, Oct 31, 2011 at 7:08 AM, Daniel Tsou <
[email protected]>wrote:

Queries are a lot harder than you think because a search isn't as
simple as saying select *. You need to make sure that you search every
field, and every word, whether middle, end or start of a sentence, and
if it's two words, you need to allow the search to be fluid to say
search all word a and search all word b then search both combined and
both but separate. I gave up in the end and went to find a library to
provide proper searching.

Reply to this email directly or view it on GitHub:
#57 (comment)

@jedimdan
Copy link
Member

Don't need. I'll just sort according to what you guys tell me.

@jedimdan
Copy link
Member

jedimdan commented Nov 1, 2011

@kennethkok Wait, for projects why can't they just be sorted according to the date they were created?

@kennethkok
Copy link
Member

They can, by choosing the sort-by drop down.
Chris prefers the default to be something that will be more useful.

Veteran project owners have "proved" their reliability in giving projects
to students. So we're listing them on the top to reduce risk of students
not getting their deliverables passed.

Basically we're going back to the point on making this a wonderful site for
student developers. No shortchanging them.

On Tue, Nov 1, 2011 at 12:05 PM, Daniel Tsou <
[email protected]>wrote:

@kennethkok Wait, for projects why can't they just be sorted according to
the date they were created?

Reply to this email directly or view it on GitHub:
#57 (comment)

@jedimdan
Copy link
Member

jedimdan commented Nov 2, 2011

Wow that's going to be really tough. Been trying to figure out how to do that, cos sorting is done per model and all these data isn't in the model we want to sort, they're in one of the attributes inside the model. I've already completed basic sorting so I'll commit that code first.

@kennethkok
Copy link
Member

sure, if we cant do that we could always tell him that we're not able to
and sort it by some other way.

sorry, we didnt know that the sorting was so much different from what we
learned in DM.

On Wed, Nov 2, 2011 at 8:53 AM, Daniel Tsou <
[email protected]>wrote:

Wow that's going to be really tough. Been trying to figure out how to do
that, cos sorting is done per model and all these data isn't in the model
we want to sort, they're in one of the attributes inside the model. I've
already completed basic sorting so I'll commit that code first.

Reply to this email directly or view it on GitHub:
#57 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants