Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get page created date Using Source Editor

Minwoo Kim June 3, 2022

I am trying to make a page template that shows views of weekly jira issues of our teammates.


the problem here is that we create absolue pages such as "team issues for May, Week1","team issues for May, Week2".. and so forth.

This means that we are not interested in using dynamic JQLs such as 
'assignee = 'teammate1' and someDateColumn > -1w and someDateColumn<now()' we want 'assignee = 'teammate1' and someDateColumn > "start date of week index of page" and someDateColumn<"end date of week index of page"'

so I figured out this plugin, Source Editor, which allows us to create xhtml scripts for each page. 

https://community.atlassian.com/t5/Confluence-questions/Can-I-use-a-variable-with-a-macro-I-am-trying-to-create-a-custom/qaq-p/203566

https://community.atlassian.com/t5/Confluence-questions/How-to-add-current-date-field-in-a-confluence-template/qaq-p/632655

Then we thought using such code like this


#set($dateInfo=$action.dateFormatter.formatGivenString("yyyy-MM-dd",$content.getCreationDate())


<p>
<ac:structured-macro ac:macro-id="2b3481fa-d5ab-4018-ba5e-d01520dfc7f6" ac:name="jira" ac:schema-version="1">
<ac:parameter ac:name="server">Jira</ac:parameter>
<ac:parameter ac:name="columnIds">issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution</ac:parameter>
<ac:parameter ac:name="columns">key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution</ac:parameter>
<ac:parameter ac:name="maximumIssues">20</ac:parameter>
<ac:parameter ac:name="jqlQuery">assignee = teammate1 and someDateColumn &lt;= '$dateInfo' </ac:parameter>
<ac:parameter ac:name="serverId">4115665c-2df5-3a5b-823f-5a1bb7c005b2</ac:parameter>
</ac:structured-macro>
</p>


however once I apply it <p></p> is wrapped with the #set command....

is there any way to initiate a variable that contains the page created date and
use it in the jira issue macro?


0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events