Menu

can functionalCI be organized by sub categories?

barakbar
2021-02-16
2021-03-26
  • barakbar

    barakbar - 2021-02-16

    Hii,

    I can already do functionalci filter based on user with profile/permission, I want to ask if functionalci can be filtered by service?
    so when I select a service for example:
    Install the application on the server, then the functionalCI will automatically display several servers that I have arranged based on service,
    can it be done?

     

    Last edit: barakbar 2021-02-18
  • barakbar

    barakbar - 2021-02-18

    please, does anyone want to answer?

     
  • silmovik

    silmovik - 2021-02-18

    i have the same problem, so many ci that is showed from asset when i create ticket.

     
  • barakbar

    barakbar - 2021-02-19

    I've tried adding this OQL in the section:

    <class id="FunctionalCI">
                      <scopes>
                      <scope id="all">
                        <oql_view><![CDATA[SELECT FunctionalCI AS ci JOIN lnkFunctionalCIToService AS s1 ON s1.functionalci_id = ci.id JOIN lnkFunctionalCIToTicket AS s2 ON s2.functionalci_id = ci.id WHERE s1.service_id=:current_service->org_id]]></oql_view>
                      </scope>
    

    but instead an error appeared, and my iTop portal didn't display the error text :(
    can anyone help?

    Thanks,
    Kind Regards, Akbar:)

     

    Last edit: barakbar 2021-02-19
  • Pierre Goiffon

    Pierre Goiffon - 2021-03-02

    Hello,
    Not sure to understand what the question is, can you rephrase please ? For now I suppose you want that when creating a ticket, the add FunctionalCI dialog be filtered depending on the service selected ? I am right ?
    If so you should take a look at the Prefill API

     
  • barakbar

    barakbar - 2021-03-04

    Thanks Pierre,

    I've tried prefill api but it automatically fills in the functionalci section, can I select it manually? but the functionalci in the service are selected?

    with this code :

    public function PrefillCreationForm(&$aContextParam)
        {
            $id = $this->Get('service_id');
                if ($id != 0)
            {
               $oSubcategoryObject = MetaModel::GetObject('Service', $id, false);
               $this->Set('functionalcis_list',$oSubcategoryObject->Get('functionalcis_list'));
            }
        }
    
     
  • Pierre Goiffon

    Pierre Goiffon - 2021-03-09

    Thanks for the clarification.
    The prefill API is the answer... but this would be PrefillSearchForm method instead ! See the example in the page I linked before.

     
  • barakbar

    barakbar - 2021-03-12

    Hii, Pierre
    I've tried the Prefill Search Form but nothing happened when I made a ticket on the portal And when I select the functionalci from the portal it appears instead all the functionalci that I have entered in itop, this is my code:

    public function PrefillSearchForm(&$aContextParam)
    {
                    if($aContextParam['dest_class'] == 'Service'
                        || is_subclass_of($aContextParam['dest_class'], 'Service'))
                    {
                        if(MetaModel::IsValidAttCode($aContextParam['dest_class'],'functionalcis_list')
                            && !empty($this->Get('functionalcis_list')))
                        {
                            $aContextParam['filter']->ResetCondition();
                            $aContextParam['filter']->AddCondition('functionalcis_list', $this->Get('functionalcis_list'));
                        }
                    }
      }
    

    can anyone help me?

     

    Last edit: barakbar 2021-03-12
  • barakbar

    barakbar - 2021-03-26

    anyone want to help me?

    Thanks,
    Kind Regards

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.