Structure REST-API: Problem getting forest / values resources

Roman Vonwil September 16, 2019

Hi guys

I hope someone could help me out a bit..
Our CEO would like to have an automated "flat" export of our structures and issues in the structures.

I already managed to get the structures itself and the forest resources.
From the formula attribute of the forest-response I extracted the rowIds, itemstypes etc already.


Problem 1 - strange value:

One element in the formula field is irritating me a bit:

"5435:2:5//s.grouper.field.%2Bno-option:2"

For me that looks like an error...?

----

The main-structure contains several itemTypes:

"2""com.almworks.jira.structure:type-issuetype",        
"4""com.almworks.jira.structure:type-generator",        
"5""com.almworks.jira.structure:type-folder",        
"7""com.almworks.jira.structure:type-sprint",        
"12""com.almworks.jira.structure:type-project",        
"13""com.almworks.jira.structure:type-cf-option"


Problem 2 - Value-resource Repsonse not "complete"

If I now try to access "correct" (not the possible error above) value-resource with the following request:

Payload:

{"requests":    
[{
"attributes":
[{
"format":"text","id":"summary"},
{
"format":"text","id":"issuetype"},
{
"format":"text","id":"key"},
{
"format":"text","id":"assignee"}]    
,
"forestSpec":{"structureId":182},
"rows":[29060,29070,29290,4807]    }]}

- 29060 and 29070 are of itemType "folder"
- 29290 and 4807 are issues

If i check the resulting xml-file i the something alike this:

<data>
<attribute>    
<id>summary</id>
    
<format>text</format>
</attribute>
<values xmlns:xsi="http..." xmlns:xs="http..." xsi:type="xs:string">FolderA</values>
<values xmlns:xsi="http..." xmlns:xs="http..." xsi:type="xs:string">FolderB</values>
<values xmlns:xsi="http..." xmlns:xs="http..." xsi:type="xs:string">IssueSummary1</values>
<values xmlns:xsi="http..." xmlns:xs="http..." xsi:type="xs:string">IssueSummary2</values>
<trailMode>INDEPENDENT</trailMode>
</data>
<data>
<attribute>    
<id>issuetype</id>
    
<format>text</format>
</attribute>
<values xmlns:xsi="http..." xmlns:xs="http..." xsi:type="xs:string">Task</values>
<values xmlns:xsi="http..." xmlns:xs="http..." xsi:type="xs:string">Improvement</values>
<trailMode>INDEPENDENT</trailMode>
</data>

 

Is there a way that i get "empty" values for folders? like this I can't combine the result-values to a single row if I have not the same amount of records per "<data>" element...

Your help would be really appreciated.

Regards

Roman

 

 

1 answer

0 votes
Daria_Baltiyskaya_ALM_Works_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2020

Hello Roman,

Sorry for such a delayed reply. Our support team has missed your post somehow. Do you still need assistance with this? If so, feel free to raise a support ticket in our support portal - https://support.almworks.com

Kind regards,

Daria

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events