Stand with Ukraine 🇺🇦

Issue Worklogs on a Confluence Page

Issue Worklogs - Show worklogs from Jira issues - Preview 2
Issue Worklogs - Show worklogs from Jira issues - Preview 3
reporting

This user macro fetches worklogs from a Jira issue and displays them in a sortable table within a Confluence page. It uses the Jira REST API to pull data including creation date, author, time spent, and worklog comments. Comments are parsed from Atlassian Document Format (ADF) to plain text for readability. If no worklogs are available, a friendly message with a link to the issue is shown. The macro auto-updates when worklogs change, ideal for time tracking visibility or project retrospectives.

Try for free

Template

#set ( $worklogs = $JiraManager.get("/rest/api/3/issue/${parameters.issue}/worklog").worklogs)

#set ( $jiraURL = $StringUtils.replace($baseUrl, "/wiki", "") )
#set ( $issueURL = "${jiraURL}/browse/${parameters.issue}" )

#if(!$worklogs)
  No worklogs for issue <a href="$issueURL">${parameters.issue}</a>
  #stop
#end

<table class="aui">
      <thead>
        <tr>
          <th colspan="4"><center>Worklogs for issue <a href="$issueURL">${parameters.issue}</a></center></th>
        </tr>
        <tr>
          <th>Date</th>
          <th>Author</th>
          <th>Time spent</th>
          <th>Comment</th>
        </tr>
      </thead>
      <tbody>
  ## Loop through worklogs
  #foreach ( $w in $SortTool.sort($worklogs, ["created:desc"]) )
        <tr>
          <td>$StringUtils.substringBefore($w.created, "T")</td>
          <td><ac:link><ri:user ri:account-id="${w.author.accountId}"/></ac:link></td>
          <td>$w.timeSpent</td>
          <td>
            #if ( $w.comment ) ## Comment might be empty
              ## Parse comment from Atlassian Document Format (ADF)
              #foreach ( $c in $w.comment.content[0].content )
                #if ($c.type == "text")
$c.text 
                #end
              #end
            #end
          </td>
        </tr>
  #end

      </tbody>
    </table>

User Parameters

Issue

Issue ID or Isse Key e.g. UM-333

Chosen by Top Global Companies Across Diverse Industries

BNP Paribas
Census
CNES
EDP
HHMI
HP
Hyundai
Index
Intercars
Melia
BNP Paribas
Census
CNES
EDP
HHMI
HP
Hyundai
Index
Intercars
Melia
Ministry
NVIDIA
PayPay
Pfizer
Qualcomm
Rail Canada
Red Cross
SEC
Space Institute
Telefonica
Ministry
NVIDIA
PayPay
Pfizer
Qualcomm
Rail Canada
Red Cross
SEC
Space Institute
Telefonica

Got Questions?

Fill out the form, and we'll guide you through every step of the way