I am working on a unique automation and one of the challenges I am currently trying to solve is the ability to include a confluence page link based upon the values in two custom fields.
Let me start with a basic scenario to provide context and then I will give an example use case that is more specific.
Context
Custom field 1: 10 values (1,2,3...10)
Custom field 2: 5 values (A,B,C,D,E)
Confluence: There will be a unique page for each variant CF1-CF2:
So in this case there are 50 unique confluence pages.
Real world example
The assignee of Jira issues are responsible for sending invitations to various events. The events are held in 10 NFL cities and there are five unique events/venues in each of these cities. I will create unique email templates in confluence for each of these 50 events. Each Jira issue has two custom fields one for the city and one for the event/venue.
I am using automation to notify the assignee that the invitations are ready to be sent and include a link to the appropriate confluence page based upon the two custom fields.
Obviously I do not want to do an if-then-else for all 50 variations. Looking for unique solutions. I may be too far in the weeds on automation and there may be a better solution. Oh, and yes I am only considering native solutions no third-party apps need apply. ;-)
For your uniquely named pages, is the "CF1-CF2" the exact title of the page? If so, you could use the Send Web Request action to call the REST API endpoint to search for the page using the title parameter:
https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-get
If it is not the full, exact page title, you could try using the other parameters for that same endpoint to narrow the scope of what is searched in Confluence, and then use smart value, list filtering or a dynamic regular expression (in a variable) with the match() function to find the correct page.
Kind regards,
Bill
Thanks for chiming in @Bill Sheboy , unfortunately, and I should have conveyed earlier, controls around page naming are largely non-existent though I may try to push for this. In the meantime, I have pushed for an approach that would simply require the inclusion of a URL field for the time being.
I expect that your second suggestion is the way forward and where I will focus. If I get this working I will publish an article in the Community.
Thanks again for providing your thoughts!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.