Tags usage for database view

march
Kilo Guru

System info: Istanbul - Patch 10

Test done with an admin account

I have a need to report on Problems that contains an attachment with a specific tags (RCA in this case).

So, my initial idea was:

- to create a database view with the table problem and the table sys_attachment.

- and then report on that database view for all attachment linked to a problem that contains the specific tags

The problem is that when creating a DB view it seems the Tag field is not properly searchable.

This is my DB view definition:

find_real_file.png

(i restricted the field returned to make sure i only return the sys_tags field of the sys_attachment table and not the one of the problem table)

I then created a report on the db view "u_attach_to_problem" and looked for entries with sys_tags = RCA, but then, the report returns all entries, not considering my filter.

find_real_file.png

Please also note that the field available for reporting is not called "Tags", but "sys_tags", the field name, not the Label...strange

I verified the sys_attachment table for an attachment containing the "RCA" tags linked to table "problem". And found only one, so i should get only one hit in my report

find_real_file.png

The last verification i did was to take that sys_attachment entry's sys_id and searched in my report for the record with that sys_id.

find_real_file.png

That record was found, but the sys_tags field displayed was empty...so i think my issue is there, but i can't find a way to resolve it.

Does anyone has a magical solution to this or should i create an hi ticket?

Thanks

Marcus

1 ACCEPTED SOLUTION

Kannan Nadar
Tera Guru

Hey Marcus,



Tags are stored in table "label" and once we add a tag to a ticket or anything, that gets stored in "label_entry" table. If you look at the "label" table you will get the idea.



Thanks,


Kannan


View solution in original post

3 REPLIES 3

Kannan Nadar
Tera Guru

Hey Marcus,



Tags are stored in table "label" and once we add a tag to a ticket or anything, that gets stored in "label_entry" table. If you look at the "label" table you will get the idea.



Thanks,


Kannan


I searched the dictionary for all table with the keyword tag to try to find that info.


This is the building block i was missing 🙂


Thank you !!


BR


Marc.


bassasam
Giga Contributor

Hi,

 

how did you fix this. Can you elaborate.