<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST API JIRA : worklog in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/2871603#M39469</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Can you explain idea abot this first funkcion?&lt;/P&gt;&lt;P&gt;Whi this is neeade and how I call it later?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
    <pubDate>Fri, 28 Oct 2022 19:05:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-28T19:05:06Z</dc:date>
    <item>
      <title>REST API JIRA : worklog</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/995017#M22857</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working for the first time with the JIRA API and PowerBI.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal : I want to extract all detailed worklogs from JIRA to build a dashboard for the team.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue : the query I am currently using just extract the consolidated time on a ticket. However I would need the detail by user.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query I am currently using :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Json.Document(Web.Contents("&lt;A href="https://XXX.atlassian.net/rest/api/2/searchstartAt=0&amp;amp;maxResults=100&amp;amp;jql=project=&amp;quot;&amp;quot;YYYY&amp;quot;&amp;quot;&amp;amp;expand=,names" target="_blank" rel="noopener"&gt;https://XXX.atlassian.net/rest/api/2/searchstartAt=0&amp;amp;maxResults=100&amp;amp;jql=project=""YYYY""&amp;amp;expand=,names&lt;/A&gt;")),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone knows which parameters should I insert to extract the complete worklog table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moreover, do you know how to extract more than 100 rows at the same time? For now I am using a main query which combined sereal query with hundred results rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 09:28:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/995017#M22857</guid>
      <dc:creator>Florian89</dc:creator>
      <dc:date>2020-03-27T09:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: REST API JIRA : worklog</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/1090973#M23693</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;define a function named getJIRADCPage:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(_jql as text, _fields as text, _startAt as text) =&amp;gt;
let
    Source = Json.Document(
    Web.Contents(
        "you company jira url",
        [
            RelativePath="/rest/api/2/search",
            Query=[
                maxResults="1000", 
                jql=_jql,
                fields=_fields,
                startAt=_startAt
            ]
        ]
    )),
    issues = Source[issues],
    #"Converted to Table" = Table.FromList(issues, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"expand", "id", "self", "key", "fields"}, {"Column1.expand", "Column1.id", "Column1.self", "Column1.key", "Column1.fields"})
in
    #"Expanded Column1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;query body:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Json.Document(Web.Contents( "your company jira url",
    [
        RelativePath="/rest/api/2/search",
        Query=[
        maxResults="1000",
        jql="author=xxx",
        fields="key",
        startAt="0"
    ]
    ])),
    total1 = Number.Round(Source[total]/1000 + 0.5-1, 0, RoundingMode.Up),
    List = List.Transform({0..total1}, each _ * 1000),
    #"Converted to Table" = Table.FromList(List, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}),
    #"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "Data", each GetJIRADCPage("author=xxx", "field1, field2", [Column1])),  #till here, all issues belong to autor:xxx are gotten
    #"Expanded Data" = Table.ExpandTableColumn(#"Invoked Custom Function", "Data", {"Column1.key"}, {"Column1.key"}),
    #"Add worklog url" = Table.AddColumn(#"Expanded Data", "worklog url", each "https://your company jira url/rest/api/latest/issue/"&amp;amp;[Column1.key]&amp;amp;"/worklog"),
    #"Invoked Custom Function1" = Table.AddColumn(#"Add worklog url", "worklog", each Json.Document(Web.Contents([worklog url])))
in
    #"Invoked Custom Function1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then shape data as you want &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 05:59:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/1090973#M23693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-16T05:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: REST API JIRA : worklog</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/2871603#M39469</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Can you explain idea abot this first funkcion?&lt;/P&gt;&lt;P&gt;Whi this is neeade and how I call it later?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 19:05:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/2871603#M39469</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-28T19:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: REST API JIRA : worklog</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/2908402#M39763</link>
      <description>&lt;P&gt;purpose of this first function is we can tell JIRA get data starting at any index which specifed by _startAt as third parameter of this function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;total1 = Number.Round(Source[total]/1000 + 0.5-1, 0, RoundingMode.Up), &amp;nbsp;&amp;nbsp; //source[total] is the numbe of rows gottent from JIRA.&amp;nbsp; so this line make for example total1=0 when total==600, total1=1 when total==1001&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;List = List.Transform({0..total1}, each _ * 1000),&amp;nbsp; //we will have list{0,1} for example when total=1001.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#"Converted to Table" = Table.FromList(List, Splitter.SplitByNothing(), null, null, ExtraValues.Error), //convert list{0, 1} to table with only one column but 2 rows with row0=0, row1=1.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}),&amp;nbsp;&amp;nbsp; //change int to type since we define _startAt as text in function.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "Data", each GetJIRADCPage("author=xxx", "field1, field2", [Column1])),&amp;nbsp;&amp;nbsp; //then we call function we defined for each row of table we generated and specify _startAt by value of Column1 of this table.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 06:30:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-JIRA-worklog/m-p/2908402#M39763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-16T06:30:11Z</dc:date>
    </item>
  </channel>
</rss>

