| 状态 | ||||||
|---|---|---|---|---|---|---|
|
| 注意 |
|---|
| 你需要先 配置数据库连接 才能从数据库中提取数据。 |
- 新建或编辑一个Confluence页面
- 插入 SVG Chart Macro 宏
- 在 SVG Chart Macro 宏主体中插入 ‘代码宏’
- 在代码宏中输入 sql 查询语句(只支持 select 开头的查询语句)
- 编辑 代码宏,代码宏的标题中输入 数据库连接 中已经配置的名称,如果不设置这个名称,则默认连接第一个 数据库连接。
SQL 查询语句范例
按照项目和问题类型统计问题个数
| 代码块 | ||||
|---|---|---|---|---|
| ||||
select st.pnames.spacename,count(case when contenttype='PAGE' then contenttype else null end) as 状态页面, count(*case when contenttype='ATTACHMENT' then contenttype else null end) as 数量附件 from jiraissueCONTENT jic join issuestatusSPACES sts on ji.issuestatus=st.idc.spaceid=s.spaceid JOIN SPACEPERMISSIONS sp ON s.spaceid=sp.spaceid where sp.PERMALLUSERSSUBJECT is null and sp.PERMGROUPNAME is null and sp.PERMUSERNAME is null group by sts.pnamespacename; |
| Svg chart macro | |||||||
|---|---|---|---|---|---|---|---|
| |||||||
|
