Forum Discussion
REST API JIRA : worklog
Hi.
Can you explain idea abot this first funkcion?
Whi this is neeade and how I call it later?
regards
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.
total1 = Number.Round(Source[total]/1000 + 0.5-1, 0, RoundingMode.Up), //source[total] is the numbe of rows gottent from JIRA. so this line make for example total1=0 when total==600, total1=1 when total==1001
List = List.Transform({0..total1}, each _ * 1000), //we will have list{0,1} for example when total=1001.
#"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.
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}), //change int to type since we define _startAt as text in function.
#"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "Data", each GetJIRADCPage("author=xxx", "field1, field2", [Column1])), //then we call function we defined for each row of table we generated and specify _startAt by value of Column1 of this table.