News:

Looking for a good read? Check out the SimpleDesk Team Blog.

Main Menu

Bugs in SimpleDesk-SSI.php

Started by ccbtimewiz, November 03, 2015, 11:34:56 PM

Previous topic - Next topic

ccbtimewiz

Hello,

I made a plugin for SimplePortal that displays information from SimpleDesk as a block.

The following is my source: http://simpleportal.net/index.php?topic=14166.0

I found some issues, as following:

#       An advanced help desk modifcation built on SMF        #

Modification is spelled wrong, and it seems that way for every file.

return ssi_getSDTickets($query_where, $query_where_params, '', 'hdt.id_ticket ASC', $output_method);

$limit is called for but never used in the return.

return ssi_getSDTickets($query_where, $query_where_params, '', 'hdt.id_ticket ASC', $output_method);

$limit is called for but never used in the return.

* <li>opener: array of details about the person who the ticket is assigned to:
* <ul>
* <li>id: user id of the person who the ticket is assigned to</li>
* <li>name: username of the person who the ticket is assigned to or 'Unassigned' otherwise</li>
* <li>link: link to the profile of the person  who the ticket is assigned to or 'Unassigned' otherwise</li>
* </ul>
* </li>


'opener' is not the correct key, it is 'assigned' as seen below.

'assigned' => array(

* <li>urgency_id: Number representing ticket urgency</li>
* <li>urgency_text: String representing ticket urgency</li>
* <li>status_id: Number representing ticket status</li>
* <li>status_text: String representing ticket status</li>


These are documented as such however the array output is a bit different:

'urgency_id' => $row['urgency'],
'urgency_string' => $txt['shd_urgency_' . $row['urgency']],
'status_id' => $row['status'],
'status_text' => $txt['shd_status_' . $row['status']],


string vs text

For the queries, department is never referred to and isn't built in the array. While this isn't a bug, would be a nice feature to have for plugins.

SleePy

I've fixed the bugs as mentioned in the version I'm working on for SMF 2.1
https://github.com/SimpleDesk/SimpleDesk/commits/smf21

I didn't add the department yet.  That will need more time.
Jeremy D — Spare-Developer

ccbtimewiz

That's great news!

Will you be updating the version for SMF 2.0 as well, or are you dropping support for it?

SleePy

At this point I plan to maintain it for security issues.  I do not believe I will be doing any bug fixes to it.
Jeremy D — Spare-Developer

ccbtimewiz

Quote from: SleePy on November 04, 2015, 09:47:27 PM
At this point I plan to maintain it for security issues.  I do not believe I will be doing any bug fixes to it.

Out of the simple SSI functions that my plugin uses, I haven't really gotten through all of SD's internal code. It looks really nice and I am liking how a majority of it follows SMF's coding guidelines and it uses a lot of things that SMF should be doing (like using shd_profile_link() function to create the link information for profile instead of building it every single time).

Are you looking for more developers for the project? I see that you are the most active developer, the other last being online a year ago. I'm sure you can find a few people interested in helping out  (myself included), you are most certainly not alone!

SleePy

Developers are welcome.  I have very little time these days, but I really need to get SimpleDesk working on 2.1, since Simple Machines officially uses it for their helpdesk and we would like to upgrade to SMF 2.1 someday.
Jeremy D — Spare-Developer

tfs

I am interested in beta testing anything new going on with SimpleDesk.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

SleePy

tfs,

I've been working on changes to get this compatible with SMF 2.1:
https://github.com/SimpleDesk/SimpleDesk/tree/smf21

I've also opened a few PRs/issues with the SMF 2.1 (https://github.com/simplemachines/SMF2.1/) for some additional changes.  My hopes is with the PRs merged and issues resolved SimpleDesk will not require any modifications of the source code to work.  100% hooks.

I've got some additional work to do here on the site.  Project Tools is no longer developed by Niko.  So I need to change over to using GitHub to track issues.  But I need/want to make it seamless integration into our site just as it was before.  Just haven't gotten around to implanting a GitHub API into the site code.
Jeremy D — Spare-Developer

tfs

I posted a 2.1 bug in Project Tools the other day. I must admit to being completely lost every time I arrive at GitHub. Where would you like me to post bugs for the time being? If it's GitHub, please give a link to the actual screen where I can post... or provide some directions.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

SleePy

tfs,

You have access to the new SimpleDesk Tracker board.  You can go ahead and post them there.  I haven't decided yet, but for now I have to approve it as a bug before it links up to the GitHub tracker.
Jeremy D — Spare-Developer

tfs

Good deal. Are you ready for any testing to get going now? Anything in  particular we're going to concentrate on? Is this just strictly getting SD to run on SMF 2.1 B2?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

SleePy

What I am focusing on is getting it working with SMF 2.1 and maybe some other changes if I can/have time to add stuff.  With all the openness I've put into the development, maybe some other coders have ideas or changes they want to submit.
Jeremy D — Spare-Developer