Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Validate Confluence Page Link With Specific Words In Title

Richard A. Michaels
Contributor
May 8, 2025

When a work item transitions, based on specific values in a custom field, I need to validate that a Confluence Page with specific words in the title of the page is linked or the transition is blocked.

I used the AI-enhanced expression builder to help build the expression.  Here the result

issue.customfield_11670 ?
(issue.customfield_11670.some(option =>
['env-1', 'env-2', 'env-3', 'env-4'].includes(option.value)
) &&
issue.remoteLinks.some(link =>
link.application.name == 'Confluence' &&
(link.title.includes('Change Authorization') || link.title.includes('Production Notification'))
)) :
false
When I test the expression with a work item which should pass, I get the following error message:

Evaluation failed: "issue.remoteLinks" - Unrecognized property of `issue`: "remoteLinks" ('remoteLinks'). Available properties of type 'Issue' are: '11037d47-9c1c-48c5-91dc-17f8cd51d247__PRODUCTION__template-object-custom-field', 'assignee', 'attachments', 'changelogs', 'childIssues', 'closedSprints', 'color', 'com.atlassian.atlas.jira__project-key', 'com.atlassian.atlas.jira__project-status', 'com.gebsun.plugins.jira.issuechecklist__checklist-text-view-only', 'com.gebsun.plugins.jira.issuechecklist__issue-checklist-progress-field', 'com.gebsun.plugins.jira.issuechecklist__issue-checklist-progress-percent-field', 'com.gebsun.plugins.jira.issuechecklist__issue-checklist-templates', 'com.intenso.jira.issue-templates__template', 'comments', 'components', 'created', 'creator', 'customfield_10000', 'customfield_10001', 'customfield_10002', 'customfield_10003', 'customfield_10004', 'customfield_10007', 'customfield_10100', 'customfield_10200', 'customfield_10300', 'customfield_10700', 'customfield_10900', 'customfield_11000', 'customfield_11100',...
Does anyone have an idea how I can accomplish what I'm trying to do other than using a Script Validator.

3 answers

2 accepted

2 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
May 15, 2025

Hi Richard,

The Jira Expressions documentation page here shows what properties you can call on an issue, and unfortunately, there is no remote links property, which is why you are getting the error you are seeing.

As Atlassian doesn't provide a property for this, then it will not be possible to validate that links to Comfluence pages exist.

Regards,

Kristian

Richard A. Michaels
Contributor
May 15, 2025

Kristian, 

Thanks for the link to the documentation. You would think they would have a way to determine if remote links are attached to a work item.

1 vote
Answer accepted
Marc - Devoteam
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.
May 13, 2025

Hi @Richard A. Michaels 

Are you using a 3rd party app in your instance related to workflows or are you using automation for this?

Richard A. Michaels
Contributor
May 14, 2025

This is a scripted validator using Adaptavist ScriptRunner.  I don't believe there are any native validators for what I'm attempting to do.

Marc - Devoteam
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.
May 14, 2025

Hi @Richard A. Michaels 

You could look at the documentation of the app if this is possible or reach out to the support department of scriptrunner.

They might be able to help you out.

Richard A. Michaels
Contributor
May 15, 2025

@Marc - Devoteam I've reached out the Adaptavist to see if they have a solution.

0 votes
Jaime Escribano
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.
May 8, 2025

Hi Richard! 

Could we get a screen capture of your attempt? You seem to be using a Jira Expression which is something that I didn't know you could to in Automation :O 

 

The behaviour you are trying to accomplish could be achieved using workflow plugins such as Workflow Magic Box | Atlassian Marketplace (disclosure: My company created this plugin). It adds the possibility of using Jira Expressions and Conditions and Validations at the workflow level, so it should do the trick :D 

Richard A. Michaels
Contributor
May 14, 2025

@Jaime Escribano This is a workflow validator, which uses Jira expressions.

I've used this type of thing to ensure linked work items are closed during the transition period and to ensure if certain work item types are needed, they are attached.  That was done with the existing Adaptavist tool.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events