Is it possible to integrate an "agent" field?

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
llarndt#

Is it possible to integrate an "agent" field?

Post by llarndt# »

Your software is very very good, but we desperately miss an "agent" field, that shows which agent/employee is responsible for resolving the problem. Is there any solution known?
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Not without quite some editing. I will try to add custom fields in the next release, but I really have a hard time finding time to work on PHPJunkyard scripts ... :(

A lot of other work ... gotta make a living!

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
logar

Re: Is it possible to integrate an "agent" field?

Post by logar »

llarndt# wrote:Your software is very very good, but we desperately miss an "agent" field, that shows which agent/employee is responsible for resolving the problem. Is there any solution known?
Worse of case you might modify the source on your own, an easy way to add an agent field (just to get the info without putting it in the database) would be to add the following code around line 83-84 in index.php (after an existing </tr> and before an existing <tr>).

<tr>
<td align="right" width="150"><?php echo 'Agent'; ?>: <font class="important">*</font></td>
<td align="left" width="600"><input type="text" name="agent" size="20" maxlength="230</td>
</tr>


which would add the "agent" field you need to the form

then around line 40-45 in the file submit_ticket.php (after the following line $name=hesk_input($_POST['name'],$hesklang['enter_your_name']);

add this line:

$agent= 'Agent:'.hesk_input($_POST['agent']);


Then search the following line:

INSERT INTO hesk_tickets (
trackid,company,name,email,category,priority,subject,message,dt,ip,status


and enter this line BEFORE the line you just searched:

$message = '<p><font size=2 color=006699"><b>'.$agent.'</b></font></p>'.$message;



and you'll have the agent noted in the message field (just a fast workaround I had to suggest you to customise hesk for your use... If you really need it to get in a separate field in the database, just tell me exactly how you need it and maybe i'll take a look at it :). Sorry I didn't post you full files sources (index.php and submit_ticket.php) but it wouldn't run if you have mysql (Converted mine to mssql and added custom fields/options). that is also why i cannot give you exact lines where to paste the code...

hope it may help you !
Maxime
logar

Re: Is it possible to integrate an "agent" field?

Post by logar »

llarndt# wrote:Your software is very very good, but we desperately miss an "agent" field, that shows which agent/employee is responsible for resolving the problem. Is there any solution known?
Worse of case you might modify the source on your own, an easy way to add an agent field (just to get the info without putting it in the database) would be to add the following code around line 83-84 in index.php (after an existing </tr> and before an existing <tr>).

<tr>
<td align="right" width="150"><?php echo 'Agent'; ?>: <font class="important">*</font></td>
<td align="left" width="600"><input type="text" name="agent" size="20" maxlength="230</td>
</tr>


which would add the "agent" field you need to the form

then around line 40-45 in the file submit_ticket.php (after the following line $name=hesk_input($_POST['name'],$hesklang['enter_your_name']);

add this line:

$agent= 'Agent:'.hesk_input($_POST['agent']);


Then search the following line:

INSERT INTO hesk_tickets (
trackid,company,name,email,category,priority,subject,message,dt,ip,status


and enter this line BEFORE the line you just searched:

$message = '<p><font size=2 color=006699"><b>'.$agent.'</b></font></p>'.$message;



and you'll have the agent noted in the message field (just a fast workaround I had to suggest you to customise hesk for your use... If you really need it to get in a separate field in the database, just tell me exactly how you need it and maybe i'll take a look at it :). Sorry I didn't post you full files sources (index.php and submit_ticket.php) but it wouldn't run if you have mysql (Converted mine to mssql and added custom fields/options). that is also why i cannot give you exact lines where to paste the code...

hope it may help you !
Maxime
logar

sorry for double post

Post by logar »

Just wanted to say sorry for double posting.
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Don't worry about it, your post is helpful :wink:
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Gems

Re: Is it possible to integrate an "agent" field?

Post by Gems »

>If you really need it to get in a separate field in the database,
>just tell me exactly how you need it and maybe i'll take a look at it :).

Hi!
I have same problem.

I would like to add some fields (3 exactly) and I need to add this in the database.

Can I help me?

Thanks

Gems
P.S. Sorry for my bad english...
Guest

Re: Is it possible to integrate an "agent" field?

Post by Guest »

Gems wrote:
I would like to add some fields (3 exactly) and I need to add this in the database.
I have resolved the problem myself
:-)

Thanks

Gems
nwbach
Posts: 4
Joined: Sun Feb 18, 2007 8:38 am

How

Post by nwbach »

I'm also trying to add 3 form fields in the submission form.

-City
-State
-Dealer Number

If I use the info posted here and since it won't show in the database; where will this information post so I can see it?

(I'm really a newbie at this)

Your script works very well. And the install was smooth!

-M
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

It would require way to much code editing to be able to help you here. You should wait for the next version of Hesk (which is currently in Beta testing) and will allow adding new fields simply from within the admin panel.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
nwbach
Posts: 4
Joined: Sun Feb 18, 2007 8:38 am

!

Post by nwbach »

Thanks for getting back to me so quickly. I can't wait for update.
l00ph0le
Posts: 5
Joined: Tue Aug 15, 2006 8:18 pm

Post by l00ph0le »

Logar, Great info that I intend on trying on my test copy of hesk..

It's funny many of us are requiring the same thing at this point. I want to thank Klemen Stirn for providing such a light and easy to use help desk.
I also look forward to seeing the next version of Hesk.

I too am looking to add a custom field to my submission form. I am looking to add a vehicle field( for fleet maintenance). I would like to be able to have the vehicle field inserted into the database, and Then I would like to add a search for by vehicles under the Show tickets field in the Admin panel.

Anyone that could help me with this let me know. I am looking to get this done asap.

By adding this one field, I can reduce the amount of categories I am going to use by almost 70%. Plus it will make it much easier for my users to be able to submit a ticket.



Sincerely

Adam

AKA L00ph0le
nwbach
Posts: 4
Joined: Sun Feb 18, 2007 8:38 am

Ditto

Post by nwbach »

I too wish to thank Klemen. He has made an amazing well written script. I'm sure everyone is driving him crazy about the "custom fields". As he has stated, this is already in beta and they're working the bugs out. I know a little of PHP, just enough to know that creating the custom fields and having them write correctly to MySQL takes a pro at PHP. And Klemen is a pro at PHP.
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Oh, you all are making me blush :oops: Just for the record I'm not even close to being a PHP "pro", I'm just a guy who likes doing some useful and simple stuff :wink:

The Beta is currently in the hands of the testers and until I get some feedback and reports I can't release such a huge update (at least from the programming side).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
nwbach
Posts: 4
Joined: Sun Feb 18, 2007 8:38 am

!

Post by nwbach »

Plus, Klemen, you are a humble "pro". That's the best kind. :!:
Post Reply