Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login
    1. Home
    2. Kleinrotti
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 13
    • Groups 0

    Kleinrotti

    @Kleinrotti

    2
    Reputation
    9
    Profile views
    13
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online
    Website github.com/Kleinrotti
    Location Germany

    Kleinrotti Unfollow Follow

    Best posts made by Kleinrotti

    • RE: CMDB Error http error

      @apfel-jan Ich sehe, dass du https/SSL nutzt. Falls du ein selbst signiertes Zertifikat nutzt, muss das Root Zertifikat und Stammzertifikat davon unter dem Idoit Server/Linux importiert werden. Sonst wird die Verbindung über SSL abgelehnt.

      posted in Allgemein
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      @FlatErik ab5d0770-de5c-4e93-a668-2c6df7f5d66d-image.png

      posted in Development
      KleinrottiK
      Kleinrotti

    Latest posts made by Kleinrotti

    • RE: i-doit erkennt die neue PHP Version nicht

      @StadtKG Es können mehrere PHP Versionen gleichzeitig installiert sein. Der Terminal Befehl gibt meistens die neuste installierte Version aus. In deinem Fall 8.2.4. Webserver wie apache2 nutzen aber meist nicht automatisch die aktuell neuste Version die installiert ist. Diese muss aktiviert werden. Z. b. bei apache2 mit den Befehlen (oder in der apache2 config):

      sudo a2dismod php7.4
      sudo a2enmod php8.2
      

      Befehl 1 deaktiviert die aktuell genutzte Version.
      Befehl 2 aktiviert die neue Version.

      Beachte aber, dass du ggf. für i-doit noch PHP Pakete für Version 8.2 nach installieren musst.

      posted in Allgemein
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      @FlatErik ab5d0770-de5c-4e93-a668-2c6df7f5d66d-image.png

      posted in Development
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      @FlatErik I added these lines of code to the file isys_api_model_cmdb_object.class.php at line 262 of the API Addon (Version 1.12.3).

      if (isset($p_params['useTemplate']) && $p_params['useTemplate']) {
                          // Get template module.
                          $l_template_module = new isys_module_templates();
      
                          $l_template_module->create_from_template(
                              [$p_params['useTemplate']],
                              $p_params['type'],
                              $p_params['title'],
                              $l_return['id'],
                              false,
                              1,
                              '',
                              $p_params['category'],
                              $p_params['purpose']
                          );
                      }
      

      Sample API Request:

      {
          "version": "2.0",
          "id": "1",
          "method": "cmdb.object.create",
          "params": {
              "apikey": "xyz",
              "language": "de",
              "type": "C__OBJTYPE__CLIENT",
              "title": "CLIENT-TEMP-638001685961295254",
              "purpose": null,
              "cmdb_status": 0,
              "description": null,
              "category": null,
              "useTemplate": 583
          }
      

      useTemplate provides the Id of the template.

      posted in Development
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      @leobaer Sorry for my late reply. Your idea to change the global unique setting to "Unique per Object type" worked. Using this setting works without the error. Thanks for that 🙂

      I was also able to implement the feature to use templates in the API Addon by my self. Happily this was just a few lines of code.

      posted in Development
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      It's quite a while now but are there new information to this topic?
      Unfortunately our workflow is not that good due to this bug. Every time we want to mass import ordered products from delivery notes with a tool, we have to disable the validation with a user which has the appropriate rights in i-doit. Afterwards we have to enable it again. This causes loss in time or if someone forgets to disable the validation, the products are not imported correctly and it has to be repeated.
      Or is there a possibility to provide a pull request for the official API-Addon to provide a bug fix myself?

      posted in Development
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      @lfischer
      And what about the bugfix for the default template? Even that would help me 🙂

      posted in Development
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      Hey @LFischer
      are there any new information?

      posted in Development
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      @LFischer Are there already any news when a bugfix will be released?

      posted in Development
      KleinrottiK
      Kleinrotti
    • RE: CMDB Error http error

      @apfel-jan Ich sehe, dass du https/SSL nutzt. Falls du ein selbst signiertes Zertifikat nutzt, muss das Root Zertifikat und Stammzertifikat davon unter dem Idoit Server/Linux importiert werden. Sonst wird die Verbindung über SSL abgelehnt.

      posted in Allgemein
      KleinrottiK
      Kleinrotti
    • RE: API create object from template

      @lfischer No I don't use placeholders in titles of the objects/templates.
      For testing purposes I disabled the validation/unique setting for the title and it's working this way - no error. But I need this settings for production, so I have to enable it again.
      This bug definitely has something to do with the validation setting.
      I would really appreciate if that bug could be fixed and if that feature request would be implemented.

      posted in Development
      KleinrottiK
      Kleinrotti