GitHub sync bug
avatar vdespa
vdespa
13 Sep 2014

image

This renders setting the status to useless, as it is impossible to later filter for example "Known issues".

Or am I missing something?

avatar vdespa vdespa - open - 13 Sep 2014
avatar mbabker
mbabker - comment - 13 Sep 2014

It's the logic in the web hooks. A close event always triggers the database to update the status to closed (see https://github.com/joomla/jissues/blob/master/src/App/Tracker/Controller/AbstractHookController.php#L460-L483). We probably need to add logic using StatusTable::getStateStatusIds() to decide whether the status should be updated by the hook to a default state (similar to what was done at 72c069f.

avatar b2z b2z - change - 16 Sep 2014
Labels Added: bug
avatar b2z b2z - change - 16 Sep 2014
Labels Added: GitHub sync
avatar b2z
b2z - comment - 16 Sep 2014

Agree. But what the logic should be? If we close an issue on GitHub what to do with the status of issue on tracker? Do not touch it if the global state was not changed?

avatar b2z b2z - change - 16 Sep 2014
Labels Removed: bug
avatar b2z b2z - change - 16 Sep 2014
Labels Added: question
avatar b2z b2z - change - 16 Sep 2014
Labels Added: enhancement
avatar mbabker
mbabker - comment - 16 Sep 2014

Same thing I did at 72c069f basically. Basically, if an item is set to Closed on GitHub, check if the item's status on the tracker is already a status that our system considers closed and if it isn't, set the status to Closed (ID = 10). Same logic for if an item is reopened.

avatar b2z
b2z - comment - 16 Sep 2014

Then I propose to change processStatus() method in AbstractHookController. See the Gist. This will require to change ReceiveIssuesHook, because the current issue status should be passed here.

What do you think?

avatar mbabker
mbabker - comment - 16 Sep 2014

That should work.

avatar b2z
b2z - comment - 16 Sep 2014

Ok :) So the next steps would be:

  1. Move these two lines to the top of updateData().

  2. Change
    $status = $this->processStatus($action);
    to
    $status = $this->processStatus($action, $table->status);

Seems like it should do the trick :thought_balloon:

avatar b2z
b2z - assign - 16 Sep 2014
Assigned to b2z
avatar b2z
b2z - comment - 17 Sep 2014

If all agree will make a PR today ;)

avatar elkuku
elkuku - comment - 18 Sep 2014

Agree :wink:

avatar b2z
b2z - comment - 19 Sep 2014

Great :) So PR will be done today.

avatar b2z b2z - reference | - 19 Sep 14
avatar mbabker mbabker - close - 19 Sep 2014
avatar mbabker mbabker - close - 19 Sep 2014
avatar elkuku elkuku - close - 19 Sep 2014
avatar elkuku elkuku - close - 19 Sep 2014
avatar elkuku elkuku - close - 19 Sep 2014
avatar mbabker mbabker - change - 19 Sep 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-09-19 19:34:24
avatar b2z
b2z - comment - 19 Sep 2014

Let's watch for it now.

avatar vdespa
vdespa - comment - 27 Sep 2014

I think it is working properly now. Thanks @b2z @mbabker

avatar elkuku elkuku - change - 27 Sep 2014
Labels Added: bug
Removed: enhancement
avatar elkuku elkuku - change - 27 Sep 2014
Labels Removed: question
avatar b2z
b2z - comment - 11 Oct 2014

Joomla! Logo JTracker Status Comment


issues.joomla.org/tracker/jtracker/490

Easy: No
Successfull Tests: 0
Unsuccessfull Tests: 0


Last updated on 11 Oct 2014 19:54:00 GMT

Add a Comment

Login with GitHub to post a comment