Success

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
17 Sep 2015

Hi @mbabker @b2z @elkuku

Here is just one more new feature that would very helpful to me ;)

This change should add more automagic this time to the categories. The Bot should add the "category" based on some tests (changed files) for pull requests as it is easyer to extract it from the pull than from the text ;)

As I have no online system to test availiable (simple no root server in the internet currently) can you review and test, suggest, improve here? Maybe we can use again @b2z 's test site (if he is back from vacation)?

Two things I'm not sure

What is the differenz between

$category['issue_id'] and $category['issue_number']?

$categoryModel            = new CategoryModel($this->getContainer()->get('db'));
$category['issue_id']     = $issueNumber;
$category['modified_by']  = $this->getGithubBotName($project);
$category['categories']   = $addCategories;
$category['issue_number'] = $issueNumber;
$category['project_id']   = $project->project_id;

$categoryModel->updateCategory($category);

As we use the CategoryModel that handle the database changes we don't need to pass the IssuesTable $tableevery time? Correct?

Thanks for any feedback ?

avatar zero-24 zero-24 - open - 17 Sep 2015
avatar zero-24
zero-24 - comment - 17 Sep 2015

If you have more ideas for folders / files to check let me know ;)

For a unknwon reason it fails on the changes in the AbstractListener.php? Did i do something wrong there?

avatar b2z
b2z - comment - 18 Sep 2015

I am almost back :) Need some days more to get things done in real life.

What is the differenz between
$category['issue_id'] and $category['issue_number']?

issue_id is the id of an issue in #__issues table and it is not equal to issue_number. So you can not assign $issueNumber to $category['issue_id'].

avatar zero-24
zero-24 - comment - 18 Sep 2015

Ok thanks @b2z So we can use here $table->id ;) And the seccond question is also fixed. Thanks :smile:

avatar b2z
b2z - comment - 18 Sep 2015

Ok thanks @b2z So we can use here $table->id ;)

Yeap as it is being passed.

avatar b2z
b2z - comment - 26 Sep 2015

Ok here I found regarding failed PHPCS check - there is a syntax error and PHPCS is failing. That's because you have protected getGithubBotName - missing word function :wink:

avatar zero-24
zero-24 - comment - 26 Sep 2015

Just fixed the first issues and travis again. thanks @b2z

avatar b2z
b2z - comment - 27 Sep 2015

So how we will test it? Ids of CMS categories are not the same as categories on my test server :)

avatar zero-24
zero-24 - comment - 27 Sep 2015

Lets add a category with id 2 and create this directory administrator/components/com_admin/sql/updates/postgresql

https://github.com/joomla/jissues/pull/705/files#diff-e6200f2e3305ca89413408a6216286efR763

If that work it looks very well. Than we can try also id 3 with administrator/components/com_admin/sql/updates/sqlazure

and than we can try to create or edit a file in both directorys. if that work i expect that it work ;)

avatar b2z
b2z - comment - 27 Sep 2015

Ok, but first we should test #696 - I've switched test server to it.

avatar b2z
b2z - comment - 14 Oct 2015

Ok I've switched test server to this PR and set up needed categories in http://jissues.j4devs.ru/tracker/jissues-test. Now we can try to issue PRs against https://github.com/b2z/jissues-test ;)

avatar zero-24
zero-24 - comment - 14 Oct 2015

@b2z can you confirm that you rename the listener for your envoirment? As it currently don't work see: http://jissues.j4devs.ru/tracker/jissues-test/23

avatar b2z
b2z - comment - 14 Oct 2015

Yeah forgot to update pulls listener. Now should be fine.

avatar zero-24
zero-24 - comment - 14 Oct 2015

@b2z can you try the last commit? I have implemented the in_array check wrong :(

avatar b2z
b2z - comment - 14 Oct 2015

Test server is updated

avatar zero-24
zero-24 - comment - 14 Oct 2015

hmm can you see any error logged? I have no idea why it fails :(

avatar b2z
b2z - comment - 14 Oct 2015

I have only

[Wed Oct 14 17:04:11 2015] [error] [client 192.30.252.40] PHP Notice:  Undefined property: stdClass::$issue in /home/admin/web/jissues.j4devs.ru/jissues/src/App/Track
er/Controller/Hooks/ReceiveIssuesHook.php on line 42
[Wed Oct 14 17:04:11 2015] [error] [client 192.30.252.40] PHP Notice:  Trying to get property of non-object in /home/admin/web/jissues.j4devs.ru/jissues/src/App/Track
er/Controller/Hooks/ReceiveIssuesHook.php on line 42
[Wed Oct 14 17:04:11 2015] [error] [client 192.30.252.40] PHP Notice:  Undefined property: stdClass::$action in /home/admin/web/jissues.j4devs.ru/jissues/src/App/Trac
ker/Controller/Hooks/ReceiveIssuesHook.php on line 64
[Wed Oct 14 17:04:11 2015] [error] [client 192.30.252.40] PHP Notice:  Undefined property: stdClass::$issue in /home/admin/web/jissues.j4devs.ru/jissues/src/App/Track
er/Controller/Hooks/ReceiveIssuesHook.php on line 68

But not fatal errors or something :(

avatar b2z
b2z - comment - 15 Oct 2015

It should be debugged somehow, seems that this will be a job for local environment.

avatar zero-24 zero-24 - change - 24 Nov 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-24 23:26:38
Closed_By zero-24
avatar zero-24 zero-24 - close - 24 Nov 2015
avatar zero-24 zero-24 - close - 24 Nov 2015
avatar zero-24 zero-24 - head_ref_deleted - 24 Nov 2015

Add a Comment

Login with GitHub to post a comment