How to port a date field from Jira to a Confluence table using Confiforms Field macro?
Asked by Bill Mills:

I have 2 fields that I currently bring into a Confluence table using this method.

The first one is the 'status' field which is done using this as the field name:

JiraIssue.fields.status.name

The second one is the 'sprint' field, which is done using this as the field name:

JiraIssue.fields.resolutiondate.greenhopperAsJSON.name

Neither of these formats work for bringing in the resolution date field (resolutiondate) into the table.

Is this possible using a different format in the field name?

Thanks!


Answers:
author: Alex Medved _ConfiForms_
body: I don't think I understand this.

Have a look at this page <https://wiki.vertuna.com/display/CONFIFORMS/Accessing+Jira+issue+fields+directly+from+ConfiForms+using+Jira+issue+field>

could you get the json response from Jira to see how it looks like? Especially the part for the resolutiondate

Alex

comments: author: Bill Mills
body: Sorry I'm not sure how to find the json response. I administer a project only at the project level; I don't have access or permissions to do or see much in the back-end.

In the link you shared, there is a section that shows exactly what I've already done with 2 other fields, using a Tableview macro. I already have the jira issue key as the first field on the tableview. The jira key field is called "fldJiraIssue".

The 2 fields I'm already bringing into the tableview are:

++**Field 1**++ - **field ID** : status - **field name** : status - **field type**: status

I bring this into my Tableview macro using another Confiforms Field macro, using this parameter for field name: fldJiraIssue.fields.status.name.

++**Field 2**++ - **field ID:** customfield_10005 - **field name:** sprint - **field type:** array

I bring this into my Tableview macro using another Confiforms Field macro, using this parameter for the field name: fldJiraIssue.fields.customfield_10005.greenhopperAsJSON.name.

New field I want to add - field ID: resolutiondate - field name: Resolved - field type: datetime

I've tried both syntax set-ups that are used in ++**Field 1**++ and ++**Field 2**++ examples, but neither works. I'm guessing it's the syntax used in the parameter, because it's a different field type (this is the case for field 1 and 2, since they each have different parameter syntax and different field types.

Appreciate your patience as I try to explain!


author: Alex Medved _ConfiForms_
body: Open the browser, go to this URL (substituting the YOUR_SERVER and YOUR_KEY)

```
https://YOUR_SERVER/rest/api/latest/issue/YOUR-KEY
```

And see what response it returns

Find the resolution date field and see it's format and location


author: Bill Mills
body: Unfortunately I don't have access to this. I get a message advising me so. I'll see if the IT team who administers the server may be able to provide it.


author: Alex Medved _ConfiForms_
body: That is a bit hard to believe to be honest

Do you have access to your Jira server?


author: Bill Mills
body: I do not. We have some more advanced users in different departments who have used rest API so extensively in the past that is caused server latency. As a result they've blocked it and taken full control of it. I can't even change a field name if I want.


author: Alex Medved _ConfiForms_
body: Honestly, there is nothing advanced... just OPEN the URL in the browser to see how Jira responds and what information it returns for a particular issue

This way we can see what data structure is returned for this "resolutiondate" field and how to get it


author: Bill Mills
body: I tried using the directions you provided and I got a system message saying I don't have permission. Unfortunately, that is all I can do. I've already opened an internal ticket to try and get some help.

Thanks!


author: Alex Medved _ConfiForms_
body: Hi [@Bill Mills](/t5/user/viewprofilepage/user-id/3973813)

Do you have a resolutiondate in the JSON returned by Jira?

What format/value does it have?

Alex

comments: author: Bill Mills
body: Hi [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) thanks for the quick reply. It has datetime format. It's the system generated timestamp field for when issue resolution is set by a status change. Thanks!


author: Alex Medved _ConfiForms_
body: Could you share exactly how it looks like and what do you want it to transform into?


author: Bill Mills
body: I can't show the coding, I'm a complete amateur when it comes to that side, and I rely heavily on existing set up. I don't want to transform it in any way, just show the datetime value from a field called "Resolved" into a Form Field macro so that the date shows in a Tableview macro.

I was able to refer to our Jira field reference table that has info about the field, and it shows as a non-custom field that is not orderable, but it is navigable and searchable (if any of that info helps). Field type is 'datetime' and the ID is 'resolutiondate'.

Does this help?


Tags: confiforms

confluence-data-center

data-center