I have a question regarding user portal. Our company doesn't want to have this click services and subservice category to create a ticket. Also, my opinion is the choice if the ticket will be critical or not should not be a choice of the user (in the end they will always say it's critical :)) They only want to have the last page of it: Inserting a Subject an a Textbody and it will create a unclassified ticket that we from IT will classify. Is there a possibility to do it this way?
Cheers,
Melanie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have raised this question to combodo and got this reply:
Hello,
The portal is a self contained application. Therefore, you can easily modify it and adapt it to your needs. For that purpose, you'll need to look at the <itop>/portal directory and mainly into the index.php file. Everything you need is in that file.</itop>
Modifying the portal/index.php should not be too complex for a developper.
Best regard
Unfortunately I have no knowledge about php and need to find and test a little bit around. Hope I can figure it out where I need to make changes and what.
Goal is to have still all services and subservices for classification active, but the user doesn't need to choose it in portal. Only IT can classify the tickets to whatever service or incident it is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just thinking about it a bit you may have to pass "default" values even if you hide them from the user as I think the Services and Service Subcategory are both required values for the ticket life cycle. If they aren't then it's a simple case of omitting the field from the form.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
that would not be a problem to have a default value. I have already tried a default Service with one default subservice: I call it "General Ticket" and "General Subservice". If this would work somehow and that me and my colleague can classify it as something else later, then it's perfect :) and it fits the needs we have.
Thanks,
Melanie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We got it somehow.... My collegue has php knowledge :) I was also thinking that the change must be around line 220, but I didn't geht it:
So that's the change for anyone who is interested in customizing the user portal:
At first you will need to create a Service Family, Service and Subcatergory: I have called them: Family: General Request - Service: General Request - Service Subcategory: General Request Subcategory
You need to find out now the ID of the Service... In our case it was ID 20
The idea behind was, creating one Service that has only one subcategory, but still the ability to classify the ticket later to something else.
Now you can make the changes in the /portal/index.php begins in our file at line 208
<ahref="#">functionSelectServiceCategory($oP,$oUserOrg){$aParameters=$oP->ReadAllParams(PORTAL_ALL_PARAMS.',template_id');$oSearch=DBObjectSearch::FromOQL(PORTAL_SERVICECATEGORY_QUERY);$oSearch->AllowAllData();// In case the user has the rights on his org only$oSet=newCMDBObjectSet($oSearch,array(),array('org_id'=>$oUserOrg->GetKey()));//if ($oSet->Count() == 1)//{$oService=$oSet->Fetch();$iSvcCategory=$oService->GetKey();// Only one Category, skip this step in the wizard//SelectServiceSubCategory($oP, $oUserOrg, $iSvcCategory);SelectServiceSubCategory($oP,$oUserOrg,20);// <==== This is where you have to insert the ID of the Service/* <===== We don't need the else so comment this out } else { $oP->add("<div class=\"wizContainer\" id=\"form_select_service\">\n"); $oP->WizardFormStart('request_wizard', 1); $oP->add("<h1 id=\"select_category\">".Dict::S('Portal:SelectService')."</h1>\n"); $oP->add("<table>\n"); while($oService = $oSet->Fetch()) { $id = $oService->GetKey(); $sChecked = ""; if (isset($aParameters['service_id']) && ($id == $aParameters['service_id'])) { $sChecked = "checked"; } $oP->p("<tr><td style=\"vertical-align:top\"><p><input name=\"attr_service_id\" $sChecked type=\"radio\" id=\"service_$id\" value=\"$id\"></p></td><td style=\"vertical-align:top\"><p><b><label for=\"service_$id\">".$oService->GetName()."</label></b></p>"); $oP->p("<p>".$oService->GetAsHTML('description')."</p></td></tr>"); } $oP->add("</table>\n"); $oP->DumpHiddenParams($aParameters, array('service_id')); $oP->add("<input type=\"hidden\" name=\"operation\" value=\"create_request\">"); $oP->WizardFormButtons(BUTTON_NEXT | BUTTON_CANCEL); // NO back button since it's the first step of the Wizard $oP->WizardFormEnd(); $oP->WizardCheckSelectionOnSubmit(Dict::S('Portal:PleaseSelectOneService')); $oP->add("</div>\n"); }*/<======Wedon'tneedtheelsesocommentthisouttillhere</a>
and a 2nd Part that is not completly needed begins at line 280:
You solved it rather elegantly and I must say in a much simpler manner than I would have approached it which was to literally remove the fields and force the values in the background.
What you basically did was force the ServiceID you needed as the parameter and left the rest of the code pretty much alone and because that ID has only one Service Subcategory associated with it, it automatically selects it when the page loads.
Good work :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks :) That's the difference if you have no glue of php or like my collegue who has a good knowledge.
Next step will be to get rid of the "how urgent" the request is. But that is not "that urgent" :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting 500 server error when i add the above custom code to portal/index.php, one thing i am not sure, how can we find the index number of the service?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The number behind value= is important, that's the number of the service id.
I don't know if there is a difference in the files for the portal index, in case you have the itil version of itop installed. Maybe someone else can help you to find this out because I never had the complete itop for ITIL installed. We only need the small ticketsystem version without incident management :)
Cheers Mel
Last edit: Melanie 2015-03-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a question regarding user portal. Our company doesn't want to have this click services and subservice category to create a ticket. Also, my opinion is the choice if the ticket will be critical or not should not be a choice of the user (in the end they will always say it's critical :)) They only want to have the last page of it: Inserting a Subject an a Textbody and it will create a unclassified ticket that we from IT will classify. Is there a possibility to do it this way?
Cheers,
Melanie
Hi there,
I have raised this question to combodo and got this reply:
Hello,
The portal is a self contained application. Therefore, you can easily modify it and adapt it to your needs. For that purpose, you'll need to look at the <itop>/portal directory and mainly into the index.php file. Everything you need is in that file.</itop>
Modifying the portal/index.php should not be too complex for a developper.
Best regard
Unfortunately I have no knowledge about php and need to find and test a little bit around. Hope I can figure it out where I need to make changes and what.
Goal is to have still all services and subservices for classification active, but the user doesn't need to choose it in portal. Only IT can classify the tickets to whatever service or incident it is.
Melanie I was trying to this myself a while back, I will get back to you on Monday when I get to work.
Just thinking about it a bit you may have to pass "default" values even if you hide them from the user as I think the Services and Service Subcategory are both required values for the ticket life cycle. If they aren't then it's a simple case of omitting the field from the form.
Hey Marco,
that would not be a problem to have a default value. I have already tried a default Service with one default subservice: I call it "General Ticket" and "General Subservice". If this would work somehow and that me and my colleague can classify it as something else later, then it's perfect :) and it fits the needs we have.
Thanks,
Melanie
We got it somehow.... My collegue has php knowledge :) I was also thinking that the change must be around line 220, but I didn't geht it:
So that's the change for anyone who is interested in customizing the user portal:
At first you will need to create a Service Family, Service and Subcatergory: I have called them: Family: General Request - Service: General Request - Service Subcategory: General Request Subcategory
You need to find out now the ID of the Service... In our case it was ID 20
The idea behind was, creating one Service that has only one subcategory, but still the ability to classify the ticket later to something else.
Now you can make the changes in the /portal/index.php begins in our file at line 208
and a 2nd Part that is not completly needed begins at line 280:
It's easy if you see the changes....
Sorry, I was too stupid to use the copy paste and formatting help :(
Maybe it's helping others who have the same problem.
Cheers,
Mel
Last edit: Melanie 2015-03-11
Melanie congratulations to you and your friend!
You solved it rather elegantly and I must say in a much simpler manner than I would have approached it which was to literally remove the fields and force the values in the background.
What you basically did was force the ServiceID you needed as the parameter and left the rest of the code pretty much alone and because that ID has only one Service Subcategory associated with it, it automatically selects it when the page loads.
Good work :)
Thanks :) That's the difference if you have no glue of php or like my collegue who has a good knowledge.
Next step will be to get rid of the "how urgent" the request is. But that is not "that urgent" :)
I am getting 500 server error when i add the above custom code to portal/index.php, one thing i am not sure, how can we find the index number of the service?
You have to put the text EXACTLY as written above. Don't forget that some lines out of the /.../ blocks are commented out singularly (with //).
the index number can also be found in the itop.view_servicesubcategory on MySQL workbench.
by the way, many thanks Melanie, helped me out a lot...
Last edit: Al Mulaj 2015-11-06
That's easy.....
Look in the HTML file of the portal page, where you can choose the services. You will find something inside like:
The number behind value= is important, that's the number of the service id.
I don't know if there is a difference in the files for the portal index, in case you have the itil version of itop installed. Maybe someone else can help you to find this out because I never had the complete itop for ITIL installed. We only need the small ticketsystem version without incident management :)
Cheers Mel
Last edit: Melanie 2015-03-31