Can I use values from Confluence sections in Jira issues?
Asked by Jeroen Haesen:

Hi,

To maintain data quality in Jira, we want to create a request form in Confluence for requesters to populate. The requester create a new page, populate the fields and in the end a Jira issue should be created.

On the Confluence page we have a section called 'Request details' and it contains a summary and wished live date. These fields are also in Jira.

<br />

My question is if it's possible via automation (smart values?) to copy the values of those fields from Confluence to the new Jira issue?

Thank you!


Answers:
author: Ben Finn
body: Howdy,  
Have you tried using this automation, I think it does what you are describing:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/320288iB32B2B1C79566195/image-size/large?v=v2&px=999 "image.png")

comments: author: Ben Finn
body: This is a Confluence automation, btw.


author: Jeroen Haesen
body: Thanks [@Ben Finn](/t5/user/viewprofilepage/user-id/5368264) . I've found indeed an automation like that, but how can I copy fields from Confluence (e.g. description) to the summary of the jira item?


author: Ben Finn
body: Howdy,

I did some testing for you and here is an idea but it would require a bit of a change. Rather than setting it to create when a new page is created, you can set it to create when a task (action item) is created.

I created a page and used the "/action item" to have the trigger go off. The [@Name](/t5/user/viewprofilepage/user-id/60706) is the assignee, body is just text and the date is the /date function.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/320479i798265663FFF75F2/image-dimensions/215x105?v=v2 "image.png")


author: Ben Finn
body: You can find the list of Confluence Smart Values here: <https://support.atlassian.com/cloud-automation/docs/smart-values-in-confluence-automation/#Task-properties>

Below is the automation.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/320480i9D7E1A4000A9D122/image-size/large?v=v2&px=999 "image.png")

The problem with having them make a page is getting the smart values to identify each piece. You may be able to look through that list above and find better smart values but will this work for you?


author: Jeroen Haesen
body: Hi [@Ben Finn](/t5/user/viewprofilepage/user-id/5368264) , thanks. This works. I can create a page with a task and then a jira is being created. Thanks for that.

But now I want to enhance it. :)  
It only works when I create the task and immediately put the information behind the task (task body). Is it also possible that I make some kind of table for a task? Something like below. It doesn't need to have the same structure. ![Jiratask.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/320500i468EB0620C8E5336/image-size/large?v=v2&px=999 "Jiratask.jpg")

We need to make it as easy as possible for the requesters to create a new item.


author: Ben Finn
body: Howdy.

I tested it out, as I'm sure you did, and it does not work in that format. Took a look again at the smart values but there is no smart value related to a table which is understandable as it would be hard to identify which table in the page is the table you want to use tasks are easy because it gives the system some direction.

There are smart values related to the content of the page and it will can make the page creator assignee. this would, of course, limit the ability to control the assignee, which may be acceptable to you.

However you have one big issue, if you look at the smart values you will also find there are no smart values related to date except for due date in task or system-controlled updated/created dates.

I'm afraid using this methodology, this is as far as you can go, to go any further you will have to take the advice of Joey and create a custom solution which you may be able to parse information from such as date.


author: Jeroen Haesen
body: Thank you [@Ben Finn](/t5/user/viewprofilepage/user-id/5368264) I appreciate the help you have given. Indeed I looked almost everywhere for solutions, but it appears not to be possible with out of the box solutions. Thanks!


author: Ben Finn
body: Good luck!


author: Joey_DevSamurai
body: Hi [@Jeroen Haesen](/t5/user/viewprofilepage/user-id/1876333), my answer is **yes**. To accomplish this, you can check out the following:

1. Use the Jira Confluence integration to create a Jira issue directly from Confluence. You can configure a Confluence page template with the Jira macro, which helps in creating Jira issues with specific fields.
2. Set up an automation rule in Jira that triggers when an issue is created. The rule can use smart values to extract data from the trigger issue. If the data from Confluence comes in a structured format, smart values can parse it.
3. If necessary, develop a custom solution using the Jira and Confluence REST APIs, which allows for more complex interactions and data transfers. This might require programming knowledge and the use of external automation services or scripts.
4. Explore Atlassian Marketplace for any add-ons that might provide this functionality if built-in options do not cover all your needs.

In short, while Jira doesn't natively pull data from Confluence fields, you can create a structured process that involves using Jira issues created from Confluence, and then employ automation within Jira to populate the necessary fields based on the information provided when the issue was created.  

Good luck!

comments: author: Jeroen Haesen
body: Hi [@Joey_DevSamurai](/t5/user/viewprofilepage/user-id/5379309)

Thanks for your answer.

Regarding your suggestions:

1. I don't think we have this macro you mention. Only to insert Jira's into Confluence.![Confluencejira.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/320281i8AA23E65931EB40F/image-size/large?v=v2&px=999 "Confluencejira.jpg")

2. I wanted to try with an automation. Should I set up an automation rule in Jira that triggers when a page is created in Confluence? Or an automation in Confluence that triggers the creation of the Jira?

2a. How should I populate those fields then? Should it be via smart values? (and how?)  

Thanks.


Tags: automation

cloud

confluence-cloud

jira

smartvalues