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.