enhancement Success

User tests: Successful: Unsuccessful:

avatar b2z
b2z
21 Aug 2014

This PR will add tests filters:

tests

avatar b2z b2z - open - 21 Aug 2014
avatar b2z b2z - change - 22 Aug 2014
Labels Added: enhancement
avatar b2z
b2z - comment - 26 Aug 2014

@elkuku can you plz review/test this PR?

avatar elkuku
elkuku - comment - 28 Aug 2014

Works as advised and the code looks decent :wink:

I think the names of the filters are very project specific (needs one test). Could we rename that to what the query actually checks (which is "has one test" and "has more then one test")?

We could also add a "needs tests" option filtering for issues with 0 tests.?

And then we have this option for "unsuccessful tests". Not sure if that option makes any sense at all or if we should take this into account here?

avatar b2z
b2z - comment - 28 Aug 2014

I think the names of the filters are very project specific (needs one test). Could we rename that to what the query actually checks (which is "has one test" and "has more then one test")?

Actually I do not mind, but these are too long for dropdowns and in some languages it will be more longer.

And then we have this option for "unsuccessful tests". Not sure if that option makes any sense at all or if we should take this into account here?

I was thinking about it, but can not find any situation when we need it :)

@roland-d what do you think?

We could also add a "needs tests" option filtering for issues with 0 tests.?

By default all issues needs tests ;)

P.S.
@elkuku - thinking out loud, does make sense to implement params for the project? Not all projects are the same and params will allow to control project specific things.

avatar roland-d
roland-d - comment - 28 Aug 2014

I was thinking about it, but can not find any situation when we need it :)

Agree, no need for the unsuccessful tests. At least I have never needed it, these are simply open issues usually asking for more info.

avatar elkuku
elkuku - comment - 28 Aug 2014

no need for the unsuccessful tests

So let's remove this option then (after this PR is merged of course)

By default all issues needs tests ;)

Well I guess you would need some code to test, so in terms of GitHub you can only test pull requests but not issues, and we are displaying them both in the same list :wink:
I mean the filter could display all PRs that have not been tested yet.

does make sense to implement params for the project?

I think we have our #__projects table that holds project specific settings - with the issue at hand - what kind of params are you thinking about?

avatar b2z
b2z - comment - 28 Aug 2014

I mean the filter could display all PRs that have not been tested yet.

Ah, ok. But I am not sure how to achieve this in terms of query :confused:

what kind of params are you thinking about?

For example to enable/disable some project specific things like "tests", "easy" and so on.

avatar elkuku
elkuku - comment - 28 Aug 2014

I am not sure how to achieve this in terms of query

We have the property issue->hasCode and count = 0 ?
Something like...

// No tests yet
case 3:
    $query
        ->leftJoin(
            $db->quoteName('#__issues_tests', 'it')
            . 'ON a.id = it.item_id'
        )
        ->where($db->quoteName('a.has_code') . ' = 1')
        ->group('a.issue_number')
        ->having('COUNT(it.item_id) = 0');
    break;

For example to enable/disable some project specific things like "tests", "easy" and so on.

Yes that would be awesome - I would call this "custom fields" - we actually had that at some point ;)

avatar b2z
b2z - comment - 28 Aug 2014

Hmm, missed has_code field :blush:

Seems that it make sense to add 'a.has_code' to case: 1 and case: 2 too because we test only PRs. What do you think?

avatar elkuku
elkuku - comment - 28 Aug 2014

Seems that it make sense to add 'a.has_code' to case: 1 and case: 2 too because we test only PRs. What do you think?

I think we should check this before displaying the option of testing in the first place, so no need for adjusting the filters here ;)

EDIT: See ⇒ 354807d

avatar b2z
b2z - comment - 28 Aug 2014

Noted and PR is updated :)

avatar elkuku elkuku - change - 28 Aug 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-08-28 18:56:20
avatar elkuku elkuku - close - 28 Aug 2014
avatar elkuku elkuku - reference | - 28 Aug 14
avatar elkuku elkuku - merge - 28 Aug 2014
avatar elkuku elkuku - close - 28 Aug 2014
avatar elkuku elkuku - head_ref_deleted - 28 Aug 2014
avatar elkuku
elkuku - comment - 28 Aug 2014

OK, let's merge this.

NOTE: wording does meet only JBS requirements!

Add a Comment

Login with GitHub to post a comment