Menu ā–¾ ā–“

Tag fields in LnkContactToFunctionalCI don't work

Amarac
2021-07-05
2022-05-19
  • Amarac

    Amarac - 2021-07-05

    Hello, I have defined a tagset attribute in the LnkToFunctionalCI table. The contribution works fine, but when I try to set a tag to a contact no change is detected. However, I can import my tags to contacts by CSV and by modifying the database directly. You will have a little more information by consulting the screenshots linked to the topic.

    Screenshot #1 :

    Screenshot #2 :

     
  • Vincent @ Combodo

    Hello Amarac,
    It's a known issue (N°2058), TagSet cannot be used within n:n relationship. We planned to fix it in 3.1 hopefully.

     
    šŸ‘
    1
    šŸ‘Ž
    1

    Last edit: Vincent @ Combodo 2021-07-05
  • Amarac

    Amarac - 2021-07-06

    Hello Vincent thank you

     
  • schirrms

    schirrms - 2022-05-17

    Hi Vincent and @all,

    Still in the plan for iTop 3.1 ? I just published a (very little) extension, with the same idea as Amarac. that is, a way to categorize the kind of relation between a Contact and a FunctionalCI.
    The idea behind is that, while two people can be linked to the same CI, one can be a user, and another can be an Administrator.

    The contrib is here, and works well (for me :) YMMW) https://github.com/Schirrms/iTop-Contact-2-CI-Tags
    Tested on iTop 2.7.6 and iTop 3.0.1
    It's still usable for us, as most of our relationship are set-up trough import, but it's a little hard to explain that a manual adjustment needs phpmyadmin ;)

    Thanks,

    Pascal

     
  • Vincent @ Combodo

    Hello Pascal,
    It is still planned to be handled in the 3.1
    By the way there is a quite simple workaround, which is to handle the LinkTable as a true, standalone class, in which case, editing a relation uses the normal display and supports all type of fields.

    <class id="lnkContactToFunctionalCI" _delta="must_exist">
        <properties>
            <is_link _delta="redefine">0</is_link>
    

    TagSet is just one of the failing attribute on the edit in line mode of a relation: file, image, html, text, duration are also failing.

     
    šŸ‘Ž
    1

    Last edit: Vincent @ Combodo 2022-05-18
    • schirrms

      schirrms - 2022-05-19

      Hi Vincent,

      Thanks for your reply. I did that change (with another to have a better "view" of the relationship) and it kinda works :

      <class id="lnkContactToFunctionalCI" _delta="must_exist">
        <properties>
          <!-- As a workaround to be able to edit the tags in a link class, thanks Vincent -->
          <is_link _delta="redefine">0</is_link>
          <!-- Better display of the link -->
          <naming _delta="redefine">
            <attributes>
              <attribute id="functionalci_name"/>
              <attribute id="contact_name"/>
            </attributes>
          </naming>
        </properties>
      </class>
      

      But it's a little bit complicated to find the relationship and be able to change the value. Still far better than nothing :)
      That leads to another (not so related) question. In the naming section, is it possible to add a constant part (in that case, I would like to add '<=>')

      Thanks,

      Pascal

       
      • schirrms

        schirrms - 2022-05-19

        Hi again, for the unrelated question :
        Thanks to the doc https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Axml_reference I found out that this can be done in the dictionary files.
        So, adding the following line in my translation file does the job :

        Dict::Add('EN US', 'English', 'English', array(
            // Dictionary entries go here
            'Class:lnkContactToFunctionalCI/Name' => '%1$s <=> %2$s',
        

        Thanks,

        Pascal

         
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-05-19

    What's the main consequence of "is_link" ?

     
  • Vincent @ Combodo

    When the class in the middle is not a link, then it should have a friendlyname, otherwise it uses the id pairs. When you use a AttibuteLinkedSetIndirect it goes over the link table, if you use an AttributeLinkedSet, then it displays the object in the middle so the link table, independently of that is_link tag.

     
    šŸ‘
    1
    šŸ‘Ž
    1

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.