Child pages
  • Using Webservice Object Referencing Field

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This is the documentation for ConfiForms Server/Data Center app

However, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.

In this short tutorial we will show you how to use a Webservice Object Referencing Field type in ConfiForms

We will configure it to show the data from Jira issue And alternatively from a Confluence page. So there will be 2 fields of this type in a form


We are configuring a form with 2 fields, one to point at our confluence and another to point at our Jira instance


jiraRefpageMetadata



We also have a Hide Field rule to hide "pageMetadata" as we always want it to show the current page's metadata

The APIs we use return something like this 

Jira

// 20210202191810
// https://vertuna.atlassian.net/rest/api/latest/issue/TEST-122

{
"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations,customfield_10941.properties,customfield_10942.properties",
"id": "16632",
"self": "https://vertuna.atlassian.net/rest/api/latest/issue/16632",
"key": "TEST-122",
"fields": {
"statuscategorychangedate": "2019-05-29T15:11:54.924+0300",
"issuetype": {
"self": "https://vertuna.atlassian.net/rest/api/2/issuetype/10004",
"id": "10004",
"description": "A problem which impairs or prevents the functions of the product.",
"iconUrl": "https://vertuna.atlassian.net/secure/viewavatar?size=medium&avatarId=10303&avatarType=issuetype",
"name": "Bug",
"subtask": false,
"avatarId": 10303
},
"timespent": null,
"project": {
"self": "https://vertuna.atlassian.net/rest/api/2/project/10200",
"id": "10200",
"key": "TEST",
"name": "Test Project",
"projectTypeKey": "software",
"simplified": false,
"avatarUrls": {
"48x48": "https://vertuna.atlassian.net/secure/projectavatar?pid=10200&avatarId=10011",
"24x24": "https://vertuna.atlassian.net/secure/projectavatar?size=small&s=small&pid=10200&avatarId=10011",
"16x16": "https://vertuna.atlassian.net/secure/projectavatar?size=xsmall&s=xsmall&pid=10200&avatarId=10011",
"32x32": "https://vertuna.atlassian.net/secure/projectavatar?size=medium&s=medium&pid=10200&avatarId=10011"
}
},
"fixVersions": [

],
"aggregatetimespent": null,
"resolution": null,
"customfield_10500": null,
"customfield_10940": null,
"customfield_10941": null,
"customfield_10942": null,
"customfield_10700": null,
"customfield_10943": null,
"customfield_10944": null,
"customfield_10945": null,
"customfield_10946": null,
"resolutiondate": null,
"workratio": -1,
"lastViewed": null,
"watches": {
"self": "https://vertuna.atlassian.net/rest/api/2/issue/TEST-122/watchers",
"watchCount": 1,
"isWatching": true
},
"issuerestriction": {
"issuerestrictions": {

},
"shouldDisplay": false
},
"created": "2019-05-29T15:11:54.585+0300",
"priority": {
"self": "https://vertuna.atlassian.net/rest/api/2/priority/3",
"iconUrl": "https://vertuna.atlassian.net/images/icons/priorities/medium.svg",
"name": "Medium",
"id": "3"
},
"customfield_10100": null,
"customfield_10300": {
"hasEpicLinkFieldDependency": false,
"showField": false,
"nonEditableReason": {
"reason": "PLUGIN_LICENSE_ERROR",
"message": "The Parent Link is only available to Jira Premium users."
}
},
"labels": [

],
"timeestimate": null,
"aggregatetimeoriginalestimate": null,
"versions": [

],
"customfield_10937": null,
"customfield_10938": [

],
"customfield_10939": null,
"issuelinks": [

],
"assignee": {
"self": "https://vertuna.atlassian.net/rest/api/2/user?accountId=557058%3A49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6",
"accountId": "557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6",
"emailAddress": "sasha@vertuna.com",
"avatarUrls": {
"48x48": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/48",
"24x24": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/24",
"16x16": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/16",
"32x32": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/32"
},
"displayName": "Alex Medved",
"active": true,
"timeZone": "Europe/Tallinn",
"accountType": "atlassian"
},
"updated": "2019-05-29T15:11:54.585+0300",
"status": {
"self": "https://vertuna.atlassian.net/rest/api/2/status/10000",
"description": "",
"iconUrl": "https://vertuna.atlassian.net/",
"name": "To Do",
"id": "10000",
"statusCategory": {
"self": "https://vertuna.atlassian.net/rest/api/2/statuscategory/2",
"id": 2,
"key": "new",
"colorName": "blue-gray",
"name": "To Do"
}
},
"components": [

],
"timeoriginalestimate": null,
"description": "again",
"customfield_10012": "0|i0020f:",
"timetracking": {

},
"customfield_10600": null,
"customfield_10007": null,
"security": null,
"customfield_10800": null,
"attachment": [

],
"customfield_10009": null,
"aggregatetimeestimate": null,
"customfield_10928": null,
"summary": "test me",
"creator": {
"self": "https://vertuna.atlassian.net/rest/api/2/user?accountId=557058%3A49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6",
"accountId": "557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6",
"emailAddress": "sasha@vertuna.com",
"avatarUrls": {
"48x48": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/48",
"24x24": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/24",
"16x16": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/16",
"32x32": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/32"
},
"displayName": "Alex Medved",
"active": true,
"timeZone": "Europe/Tallinn",
"accountType": "atlassian"
},
"subtasks": [

],
"reporter": {
"self": "https://vertuna.atlassian.net/rest/api/2/user?accountId=557058%3A49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6",
"accountId": "557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6",
"emailAddress": "sasha@vertuna.com",
"avatarUrls": {
"48x48": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/48",
"24x24": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/24",
"16x16": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/16",
"32x32": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:49c2eeaf-b72c-4e4d-86a7-97c1a77b50b6/724453b8-04c2-43f6-8315-fa266a2d435a/32"
},
"displayName": "Alex Medved",
"active": true,
"timeZone": "Europe/Tallinn",
"accountType": "atlassian"
},
"aggregateprogress": {
"progress": 0,
"total": 0
},
"customfield_10000": null,
"customfield_10001": null,
"customfield_10200": null,
"customfield_10003": null,
"customfield_10400": "{}",
"customfield_10004": null,
"environment": null,
"duedate": null,
"progress": {
"progress": 0,
"total": 0
},
"votes": {
"self": "https://vertuna.atlassian.net/rest/api/2/issue/TEST-122/votes",
"votes": 0,
"hasVoted": false
},
"comment": {
"comments": [

],
"self": "https://vertuna.atlassian.net/rest/api/2/issue/16632/comment",
"maxResults": 0,
"total": 0,
"startAt": 0
},
"worklog": {
"startAt": 0,
"maxResults": 20,
"total": 0,
"worklogs": [

]
}
}
}


Confluence

// 20210202191428
// https://wiki.vertuna.com/rest/api/content/70582440

{
"id": "70582440",
"type": "page",
"status": "current",
"title": "Using Webservice Object Referencing Field",
"space": {
"id": 655361,
"key": "CONFIFORMS",
"name": "ConfiForms",
"type": "global",
"_links": {
"webui": "/display/CONFIFORMS",
"self": "https://wiki.vertuna.com/rest/api/space/CONFIFORMS"
},
"_expandable": {
"metadata": "",
"icon": "",
"description": "",
"homepage": "/rest/api/content/557060"
}
},
"history": {
"latest": true,
"createdBy": {
"type": "known",
"username": "sash",
"userKey": "ff8080814b899f8f014b89a09f260002",
"profilePicture": {
"path": "/download/attachments/557058/user-avatar",
"width": 48,
"height": 48,
"isDefault": false
},
"displayName": "Alex Medved",
"_links": {
"self": "https://wiki.vertuna.com/rest/api/user?key=ff8080814b899f8f014b89a09f260002"
},
"_expandable": {
"status": ""
}
},
"createdDate": "2021-02-02T19:13:43.073+02:00",
"_links": {
"self": "https://wiki.vertuna.com/rest/api/content/70582440/history"
},
"_expandable": {
"lastUpdated": "",
"previousVersion": "",
"contributors": "",
"nextVersion": ""
}
},
"version": {
"by": {
"type": "known",
"username": "sash",
"userKey": "ff8080814b899f8f014b89a09f260002",
"profilePicture": {
"path": "/download/attachments/557058/user-avatar",
"width": 48,
"height": 48,
"isDefault": false
},
"displayName": "Alex Medved",
"_links": {
"self": "https://wiki.vertuna.com/rest/api/user?key=ff8080814b899f8f014b89a09f260002"
},
"_expandable": {
"status": ""
}
},
"when": "2021-02-02T19:13:43.073+02:00",
"message": "",
"number": 1,
"minorEdit": false,
"hidden": false,
"_links": {
"self": "https://wiki.vertuna.com/rest/experimental/content/70582440/version/1"
},
"_expandable": {
"content": "/rest/api/content/70582440"
}
},
"extensions": {
"position": "none"
},
"_links": {
"webui": "/display/CONFIFORMS/Using+Webservice+Object+Referencing+Field",
"edit": "/pages/resumedraft.action?draftId=70582440",
"tinyui": "/x/qAA1B",
"collection": "/rest/api/content",
"base": "https://wiki.vertuna.com",
"context": "",
"self": "https://wiki.vertuna.com/rest/api/content/70582440"
},
"_expandable": {
"container": "/rest/api/space/CONFIFORMS",
"metadata": "",
"operations": "",
"children": "/rest/api/content/70582440/child",
"restrictions": "/rest/api/content/70582440/restriction/byOperation",
"ancestors": "",
"body": "",
"descendants": "/rest/api/content/70582440/descendant"
}
}


And we want to show the "Page title" and the issue type description for this particular issue, in a table...


Build like this


And to access "page title" we use the following expression (in the "field name" parameter of the ConfiForms Field macro) to navigate to a desired property: 

pageMetadata.title

And to navigate to Jira issue type description we use 

jiraRef.fields.issuetype.description



  • No labels