Adventure Game Studio

AGS Development => Site & Forum Reports => Topic started by: Radiant on Tue 11/03/2014 14:24:46

Title: Issue tracker: hide closed issues
Post by: Radiant on Tue 11/03/2014 14:24:46
Since the primary purpose of the issue tracker is to see which issues are ongoing (newly reported or still being worked on), it would be more convenient if the default view of the issue tracker (e.g. http://www.adventuregamestudio.co.uk/forums/index.php?project=3;area=issues ) would either hide closed and solved issues, or be sorted so that these issues appear at the bottom.
Title: Re: Issue tracker: hide closed issues
Post by: Crimson Wizard on Tue 11/03/2014 14:30:37
I'd wish we have ANY kind of sorting work there :)
Title: Re: Issue tracker: hide closed issues
Post by: AGA on Tue 11/03/2014 14:41:43
Hahaha, no.  Sorry.  Any changes you want made to the tracker, you'll have to do them yourselves.  It's a standard install of SMF Project Tracker (http://custom.simplemachines.org/mods/index.php?mod=1490), but that project is now dead.  It's really far too complicated, and kinda poorly written, for me to spend ages working out how to make it more usable.  The source is at the link I posted, if anyone else fancies having a go though!
Title: Re: Issue tracker: hide closed issues
Post by: Radiant on Tue 11/03/2014 14:55:28
I've done some experimenting...

You can sort things by appending them to the URL: http://www.adventuregamestudio.co.uk/forums/index.php?project=5;area=issues&sort=status
Alternatively, you can find one category by also appending that to the URL: http://www.adventuregamestudio.co.uk/forums/index.php?project=5;area=issues&status=1
(and you can combine the two, if you want)

CW, is that the kind of thing you're looking for?
Title: Re: Issue tracker: hide closed issues
Post by: AGA on Tue 11/03/2014 16:41:21
If it's as something as simple as adding a link to 'sort by x' I'm happy to do that of course.  But expanding the Project's functionality is a bit much.
Title: Re: Issue tracker: hide closed issues
Post by: Crimson Wizard on Tue 11/03/2014 16:53:45
You can filter by category by clicking on category name.
Title: Re: Issue tracker: hide closed issues
Post by: Peder 🚀 on Tue 11/03/2014 17:05:09
Or it looks like you could just edit this file: IssueList.php on line 37/38
Code (php) Select

$context['sort_by'] = 'updated';
$_REQUEST['sort'] = 'i.updated';


Change "updated" with "status"

(Though it seems all though that will put any resolved/closed issues below new/assigned ones it doesn't seem to take into picture the date they were updated.. But it's probably not too hard to sort out).
Title: Re: Issue tracker: hide closed issues
Post by: AGA on Tue 11/03/2014 17:29:12
Okay, great.  If someone wants to fiddle to make the existing sorting thing have weighting I'm happy to hack it in.
Title: Re: Issue tracker: hide closed issues
Post by: Peder 🚀 on Tue 11/03/2014 18:07:18
Ok, after scanning through the files I think this could work:
Code (php) Select

$context['sort_by'] = 'status';
$_REQUEST['sort'] = 'i.status ASC, i.updated';


These are the same lines as mentioned above. (And it seems really only the second one really does anything important)
(It might require some more small code, if this doesn't work I'll set up a local installation of SMF and test it out there.)

[EDIT]
I changed the code and it should definitely work now! :)
Title: Re: Issue tracker: hide closed issues
Post by: Peder 🚀 on Wed 12/03/2014 08:17:44
Sorry for double post but I noticed a "bug" with the issue tracker, where when you add/edit/delete categories in a project it will try and send you to the project tracker section in the forum admin area.

To fix this you can change line 591 in the file ProjectModule-Admin.php from:

Code (php) Select

redirectexit('action=admin;area=manageprojects;section=categories');


to:

Code (php) Select

redirectexit(project_get_url(array('project' => $project, 'area' => 'admin', 'sa' => 'category')));
Title: Re: Issue tracker: hide closed issues
Post by: AGA on Wed 12/03/2014 09:17:26
Done that, thanks.
Title: Re: Issue tracker: hide closed issues
Post by: Peder 🚀 on Wed 12/03/2014 09:25:37
What about the sorting thing? :).
Title: Re: Issue tracker: hide closed issues
Post by: AGA on Wed 12/03/2014 10:18:50
Sorry, when I saw "I changed the code" I thought you meant you'd actually edited the forum source files!  Made the changes now, thanks.
Title: Re: Issue tracker: hide closed issues
Post by: Peder 🚀 on Wed 12/03/2014 10:21:37
:)
Title: Re: Issue tracker: hide closed issues
Post by: Crimson Wizard on Thu 13/03/2014 14:12:48
Erm, what did you do to sorting? :( Before it sorted by last update, now it sorts by status.

EDIT: Oh, I see now, it sorts both by status AND update time.

UPD: I have to disagree with this. It's not uncommon when you need to see recently updated issues regardless of the status.
For example, "New" and "Confirmed" status both marks tasks and bugs, the difference is pretty vague, besides "Confirmed" bugs means that their presence was checked, but "Confirmed" issues are listed after "New" ones.
"Resolved" status means that developer did some changes but the issue is yet to be tested and confirmed working. When there are many "New" issues, "Resolved" will get somewhere to the end of the list, and users who were waiting for them to be fixed won't notice the update.
Title: Re: Issue tracker: hide closed issues
Post by: Peder 🚀 on Thu 13/03/2014 15:55:09
So basically the preferred result is to show closed and resolved at the bottom but have the rest ordered by when it was updated? :)

If AGA changes the previous code with this:
Code (php) Select
i.status = 6 ASC, i.status = 5 ASC, i.updated

It will sort closed at the bottom, resolved above, then the rest all by when they were last updated!
Title: Re: Issue tracker: hide closed issues
Post by: AGA on Thu 13/03/2014 16:26:17
Done!