enhancement Success

User tests: Successful: Unsuccessful:

avatar dbhurley
dbhurley
28 Nov 2013
avatar dbhurley dbhurley - open - 28 Nov 2013
avatar b2z
b2z - comment - 28 Nov 2013

For me it is not the best approach - to generate additional SQL query (and this is not a simple SELECT) in addition to the list of issues.

avatar dbhurley
dbhurley - comment - 28 Nov 2013

I contemplated grabbing a random from the list returned previously but there is overhead with doing additional PHP there as well (not to mention that will only get a first page result and based on the user's current filtering status).

avatar dbhurley
dbhurley - comment - 28 Nov 2013

Speed Test Results
Under 0.5ms response time for the query if we do not have the comment count included.

~ 3ms response time with comment count

avatar b2z
b2z - comment - 28 Nov 2013

Why not to make it as I've suggested? Just run it when it's requested ;)

avatar elkuku
elkuku - comment - 28 Nov 2013

Maybe make up the URL and a proper controller first:
"tracker/:project_alias/random" : "\\Tracker\\Controller\\Issue\\RandomController", or something, then do the work here. You may even use those links in forum posts etc.
Sure we don't want any additional queries, if possible ;)

Also I'm not sure about the number 5 for activities. Maybe we should filter only for open issues.
If you want to reduce it to 5 comments you should also check the event column for comment

avatar dbhurley
dbhurley - comment - 28 Nov 2013

Let me switch it to link with a call as suggested @elkuku and run it on click. I'm not sold on the comment part either at the moment. I like the idea.

avatar elkuku
elkuku - comment - 30 Nov 2013

This looks much better now :wink:
@b2z any further concerns ?

avatar b2z
b2z - comment - 30 Nov 2013

That what I was talking about ;) @dbhurley gj :+1:

avatar b2z
b2z - comment - 16 Dec 2013

@dbhurley please update it to get it in ;)

avatar dbhurley dbhurley - change - 16 Dec 2013
Labels Added: enhancement
avatar b2z
b2z - comment - 15 Jan 2014

@dbhurley please update one more time - there were minor fixes in the master and I cannot test without them :)

avatar dbhurley
dbhurley - comment - 15 Jan 2014

Still shows as mergeable for me.

avatar b2z
b2z - comment - 15 Jan 2014

BTW for those who does not know about interesting feature Checking out Pull Requests locally. That allows to test PRs.

@dbhurley I cannot test it - fatal error fix not in there...

avatar dbhurley
dbhurley - comment - 15 Jan 2014

ah, ok, I'll take a look and see what the latest updates are.

avatar b2z
b2z - comment - 15 Jan 2014

Just merge the master in ;)

avatar b2z
b2z - comment - 15 Jan 2014

Fatal error: Call to undefined method App\Tracker\Controller\Issue\Random::getApplication() in /vagrant/src/App/Tracker/Controller/Issue/Random.php on line 49

You still need to update your code. Application now is in the container. Model should be instantiated with the db driver (you can get it from the container also).

avatar dbhurley
dbhurley - comment - 15 Jan 2014

:) hadn't got there yet, was just merging and pushing and then will update controller. I'll be done in a second, wrapping up what I'm working on now...

avatar b2z
b2z - comment - 15 Jan 2014

Ok np ;) Waiting for test :+1:

avatar dbhurley
dbhurley - comment - 15 Jan 2014

So I updated my code but I think I might see a problem on the IssueModel with the container? This should be testable now though.

avatar b2z
b2z - comment - 15 Jan 2014

Fatal error: Class 'App\Tracker\Model\Container' not found in /vagrant/src/App/Tracker/Model/IssueModel.php on line 160. Why do you need getProject() method in the model?

avatar davidhurley
davidhurley - comment - 15 Jan 2014

I didn't add it I didn't think, my fault if I did. I don't need it. :p

Thanks,
David Hurley
On Jan 15, 2014 3:09 PM, "Dmitry Rekun" notifications@github.com wrote:

Fatal error: Class 'App\Tracker\Model\Container' not found in
/vagrant/src/App/Tracker/Model/IssueModel.php on line 160. Why do you need
getProject() method in the model?


Reply to this email directly or view it on GitHub#237 (comment)
.

avatar b2z
b2z - comment - 15 Jan 2014

Hehe :) Well without it code works :+1: Just remove this method and fix PHPCS issue in getRandomItem() method and it will be ready to merge :sunglasses:

avatar b2z
b2z - comment - 20 Jan 2014

Cmon @dbhurley I know you can do it :sunglasses:

avatar dbhurley
dbhurley - comment - 20 Jan 2014

um...done I thought :) - same day!

avatar b2z
b2z - comment - 20 Jan 2014

Nope :)

avatar b2z b2z - change - 11 Feb 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-02-11 11:32:27
avatar b2z b2z - close - 11 Feb 2014
avatar b2z b2z - reference | - 11 Feb 14
avatar b2z b2z - merge - 11 Feb 2014
avatar b2z b2z - close - 11 Feb 2014
avatar elkuku
elkuku - comment - 11 Feb 2014

Unfortunately our testing method have changed since this PR was opened and are now failing - please correct :wink:

avatar b2z
b2z - comment - 11 Feb 2014

From where there are language files failing?

avatar elkuku
elkuku - comment - 11 Feb 2014

There are also errors in language files, but these will not cause the Travis test to fail (yet) - but checkstyle errors do :wink:

avatar b2z
b2z - comment - 11 Feb 2014

Ah, ok. So these errors in language files existed earlier.

avatar elkuku
elkuku - comment - 12 Feb 2014

Currently the random functionality shows also closed issues and sometimes I get "invalid issues"

avatar b2z
b2z - comment - 12 Feb 2014

Hmm, but how it could be?

->where($this->db->quoteName('s.closed') . '=' . 0)
avatar elkuku
elkuku - comment - 12 Feb 2014

I hope it's not a PEBCAK again, but I get all sorts of unwanted results on http://issues.joomla.org/tracker/joomla-cms/random
Can you confirm this?

avatar b2z
b2z - comment - 12 Feb 2014

I confirm. Interesting, because from the first look the query is ok.

avatar elkuku
elkuku - comment - 12 Feb 2014

I believe it should return the issue number instead of the id, as this is used in the url :wink:

avatar elkuku elkuku - reference | 4dc2376 - 13 Feb 14

Add a Comment

Login with GitHub to post a comment