Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-21182

Σ Original Estimate, Σ Remaining Estimate, Σ Time Spent is not in XML export view and not showing in JIRA Issues Macro when there are no subtasks

XMLWordPrintable

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      Issues without sub-tasks do not show aggregate values for original estimate, remaining estimate and time spent, meaning that when viewed by the JIRA Issues Macro in Confluence you do not see any values in those columns even though there should be.

      Steps to Reproduce

      1. Create an issue and log time against it.
      2. Click Export->XML for the issue and look for the field 'aggregatetimespent'

      Expected Results

      aggregatetimespent should be present and should contain the same value as was entered in step 1.

      Actual Results

      aggregatetimespent is not present.

      Notes

      Confluence Jira Issues macro is affected by this as it used the SearchRequest.xml Jira endpoint. We can replicate this by taking the request from Confluence from the Jira access log:

      Example:

      • SCRUM-24 is a sub-task for SCRUM-23
      • SCRUM-2 is simply a story with no subtasks
      curl "https://jira.local:8853/j853/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?tempMax=20&returnMax=true&jqlQuery=PROJECT+%3D+Scrum+++AND+key+IN+%28SCRUM-24%2C+SCRUM-23%2C+SCRUM-22%2C+SCRUM-2%29+&field=summary&field=type&field=aggregatetimeoriginalestimate&field=timeoriginalestimate&field=link&xoauth_requestor_id=admin" 

      Results in the fields missing in the output:

      <channel>
      <item>
      <link>https://jira.local:8853/j853/browse/SCRUM-24</link>
      <key id="10503">SCRUM-24</key>
      <summary>TESTET</summary>
      <type id="10003" iconUrl="https://jira.local:8853/j853/secure/viewavatar?size=xsmall&amp;avatarId=10316&amp;avatarType=issuetype">Sub-task</type>
      <timeoriginalestimate seconds="1800">30 minutes</timeoriginalestimate>
      </item>
      <item>
      <link>https://jira.local:8853/j853/browse/SCRUM-23</link>
      <key id="10323">SCRUM-23</key>
      <summary>As a user, I&apos;d like a historical story to show in reports</summary>
      <type id="10001" iconUrl="https://jira.local:8853/j853/images/icons/issuetypes/story.svg">Story</type>
      <timeoriginalestimate seconds="3600">1 hour</timeoriginalestimate>
      <aggregatetimeoriginalestimate seconds="5400">1 hour, 30 minutes</aggregatetimeoriginalestimate>
      </item><item>
      <link>https://jira.local:8853/j853/browse/SCRUM-2</link>
      <key id="10302">SCRUM-2</key>
      <summary>As a product owner, I&apos;d like to express work in terms of actual user problems, aka User Stories, and place them in the backlog &gt;&gt; Try creating a new story with the &quot;+ Create Issue&quot; button (top right of screen)</summary>
      <type id="10001" iconUrl="https://jira.local:8853/j853/images/icons/issuetypes/story.svg">Story</type>
      <timeoriginalestimate seconds="7200">2 hours</timeoriginalestimate>
      </item>
      </channel> 

      However, /rest/api/2/search is not affected by this:

      curl "https://jira.local:8853/j853/rest/api/2/search" -H "Content-Type: application/json" -X POST --data '{"jql":"PROJECT = Scrum AND KEY in (SCRUM-24,SCRUM-23, SCRUM-22,SCRUM-2)"}' 

      Results in the fields showing:

      {
        "issues": [
          {
            "key": "SCRUM-23",
            "fields": {
              "issuetype": {
                "name": "Story",
              },
              "timespent": 600,
              "aggregatetimespent": 600,
              "timeestimate": 3600,   
              "aggregatetimeoriginalestimate": 5400, 
              "timeoriginalestimate": 3600,
              "aggregatetimeestimate": 5400,
            }
          }
          {
            "key": "SCRUM-24",
            "fields": {
              "issuetype": {
                "name": "Sub-task",
              },
              "timespent": null,
              "aggregatetimespent": null,
              "timeestimate": 1800,
              "aggregatetimeoriginalestimate": 1800,
              "timeoriginalestimate": 1800,
              "aggregatetimeestimate": 1800
          }
          {
            "key": "SCRUM-2",
            "fields": {
              "issuetype": {
                "name": "Story",
              },
              "timespent": null,
              "aggregatetimespent": null,
              "timeestimate": 7200,
              "aggregatetimeoriginalestimate": 7200,
              "timeoriginalestimate": 7200,
              "aggregatetimeestimate": 7200
            }
          }
        ]
      }
       

      Workaround

      None.

      Note: If you add the aggregate remaining estimate field it will not show up even if you have a subtask.

            Unassigned Unassigned
            jlargman Jeremy Largman
            Votes:
            45 Vote for this issue
            Watchers:
            44 Start watching this issue

              Created:
              Updated: