Can I use values from Confluence sections in Jira issues?

Jeroen Haesen April 24, 2024

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.


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! 

2 answers

1 accepted

0 votes
Answer accepted
Ben Finn
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.
April 24, 2024

Howdy,
Have you tried using this automation, I think it does what you are describing:

image.png

Ben Finn
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.
April 24, 2024

This is a Confluence automation, btw. 

Jeroen Haesen April 24, 2024

Thanks @Ben Finn . 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?

Ben Finn
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.
April 24, 2024

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 is the assignee, body is just text and the date is the /date function.

image.png

Ben Finn
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.
April 24, 2024

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

 

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?

Like Jeroen Haesen likes this
Jeroen Haesen April 25, 2024

Hi @Ben Finn , 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

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

Ben Finn
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.
April 25, 2024

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.

Jeroen Haesen April 25, 2024

Thank you @Ben Finn 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!

Ben Finn
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.
April 26, 2024

Good luck!

0 votes
Joey_DevSamurai
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 24, 2024

Hi @Jeroen Haesen, 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!

Jeroen Haesen April 24, 2024

Hi @Joey_DevSamurai 

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

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events