Pocket Query zeigt HTML als plaintext an.

Stephan Mallmann June 16, 2015

Hallo Atlassian Team,

 

ich habe ein Problem mit der Darstellung eines SQL Querys über das Plugin Pocket Query im Confluence.

Das Query zeigt eine mehrzeilige Spalte als HTML Text an und das nicht formatiert. Weiß leider nicht was ich noch tun soll.

SQL Statement:

SELECT

j5.isys_purpose__title AS 'Einsatzzweck',

j1.isys_sla_service_level__title AS 'SLA Service Level',

j2.isys_catg_sla_list__reaction_time AS 'Reaktionszeit',

j2.isys_catg_sla_list__recovery_time AS 'Wiederherstellungszeit',

j2.isys_catg_sla_list__description AS 'Beschreibung'

 

FROM isys_obj AS obj_main

INNER JOIN isys_cmdb_status AS obj_main_status ON obj_main_status.isys_cmdb_status__id = obj_main.isys_obj__isys_cmdb_status__id

LEFT JOIN isys_catg_sla_list AS j2 ON j2.isys_catg_sla_list__isys_obj__id = obj_main.isys_obj__id

LEFT JOIN isys_sla_service_level AS j1 ON j1.isys_sla_service_level__id = j2.isys_catg_sla_list__isys_sla_service_level__id

LEFT JOIN isys_catg_global_list AS j6 ON j6.isys_catg_global_list__isys_obj__id = obj_main.isys_obj__id

LEFT JOIN isys_purpose AS j5 ON j5.isys_purpose__id = j6.isys_catg_global_list__isys_purpose__id

LEFT JOIN isys_obj_type AS j9 ON j9.isys_obj_type__id = obj_main.isys_obj__isys_obj_type__id

 

WHERE TRUE

 

 AND  ( (j9.isys_obj_type__id = '45' )) AND ( (obj_main.isys_obj__title = 'Mailoptimizer' ))  ORDER BY obj_main.isys_obj__id ASC;

 

Ausgabe IST:

Einsatzzweck
SLA Service Level
Reaktionszeit
Wiederherstellungszeit
Beschreibung
Produktion + Demo + Referenz98%124<p>Verf&uuml;gbarkeit pro Quartal.</p> <p>Reaktions- und Behebungszeit f&uuml;r &quot;critical&quot; F&auml;lle

 

Ausgabe SOLL:

Einsatzzweck
SLA Service Level
Reaktionszeit
Wiederherstellungszeit
Beschreibung
Produktion + Demo + Referenz98%124

Verfügbarkeit pro Quartal.

Reaktions- und Behebungszeit für critical Fälle

 

Über eure Hilfe wäre ich sehr froh.

 

Mit freundlichen Grüßen,

Stephan Mallmann

3 answers

1 vote
Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2015

Hi Stephan,

Thank you for your interest in PocketQuery! Can you please try if it works if you create the below custom template and assign it to your query? Please let me know the result.

&lt;table class="aui confluenceTable pocketquery-table"&gt;
	&lt;thead&gt;
		&lt;tr&gt;
		#foreach ($column in $columns)
			&lt;th class="col-$velocityCount"&gt;$!column&lt;/th&gt;
		#end
		&lt;/tr&gt;
	&lt;/thead&gt;
	
	&lt;tbody&gt;
		#foreach ($row in $result)
			&lt;tr class="#if($velocityCount % 2 != 0)odd#{else}even#end"&gt;
			#foreach ($column in $row)
				#set($pqTextWithHtml = false)
				#set($pqTextWithHtml = $!column)
				&lt;td class="col-$velocityCount"&gt;$pqTextWithHtml&lt;/td&gt;
			#end
			&lt;/tr&gt;
		#end
	&lt;/tbody&gt;
&lt;/table&gt;

Regards, Felix (Scandio)

0 votes
Stephan Mallmann October 7, 2015

Hello again,

i used your template in Jun. and it works very well.
But now i have the problem that the table looks like this.

Service
Einsatzzweck
Servicelevel
Reaktionszeit
Wiederherstellungszeit
Montag
Dienstag
Mittwoch
Donnerstag
Freitag
Samstag
Sonntag
Beschreibung
Abit ScoringProduktion + Test98,5%00[B@1e353b9d[B@38dccfe9[B@28d5e729[B@733b49b0[B@3962fcea[B@11ca8415[B@6a587d3 
BraFoProduktion + TestProduktion + Test00[B@1a34f8b8[B@bb50579[B@197a50f0[B@2d57c9a1[B@5e768048[B@35e0276b[B@f3bfd6f 
Configuration ManagementLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTIONLC__CMDB__CATG__PURPOSE_PRODUCTION
EasyjobProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + TestProduktion + Test
FilemakerFilemakerFilemakerFilemakerFilemakerFilemakerFilemakerFilemakerFilemakerFilemakerFilemakerFilemakerFilemaker
FTAPIFTAPIFTAPIFTAPIFTAPIFTAPIFTAPIFTAPIFTAPIFTAPIFTAPIFTAPIFTAPI

 

The Problem is that the cell with the "LC__CMDB__CATG__PURPOSE_PRODUCTION" isn't load correctly.
If a cell is empty, the template copy the content from the previous cell.
The content of the cell with "[B@1e353b9d" must actually looks like this "09:00:00 - 17:00:00" why is the encoding so different?

 

Best regards,

Stephan

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 27, 2015

Hi Stephan! Sorry for the late reply, somehow we missed this. So is this actually two different issues? One is the column LC__CMDB__CATG__PURPOSE_PRODUCTION whose table name is displayed instead of its contents - and one is the issue with "[B@1e353b9d"?

0 votes
Stephan Mallmann June 17, 2015

YOU ARE GREAT!!!

 

Thank you very much!

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2015

It's a convention in the Velocity templating language that variables that contain HTML code will only be rendered properly if the variable name ends with "Html". Really funny. Anyway, glad it works! By the way: if you like PocketQuery, would you consider leaving a review at the marketplace?

Stephan Mallmann June 17, 2015

Done ;-)

Stephan Mallmann June 17, 2015

* * * * *

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events