Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Check if same field has already been entered before (Related Issues Condition)

Marc Isikoff October 13, 2022

When we receive requests into JSM we record a custom field (let's say it's cf 12345 and asks "team id").

Ultimately we're gong to create an Epic for the team id and park a story under it and this part works fine.

But when we get a 2nd request for the same Team ID we don't want to create a new Epic, but just a Story under the existing Epic.

In automations I'm trying to get the syntax right for Related Issues Condition where I believe we need to set Related Issues to "JQL Issues" since we're querying for existence in the project scope.

I get "Related Issues JQL" field to enter and that's where I'm stuck because the condition field says "Are Present" which I took to mean 'is in existence'.

So I'm stumped so far (no good examples found) for how to specify the JQL and tried cf[12345].value but that is not 'good JQL' and not sure if I should switch to smart values (e.g., {{issue.team id}} as the form says Smart Values cannot be validated.

1 answer

1 vote
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 13, 2022

@Marc Isikoff -

Are you creating EPICs and Story Issues in the same JSM project?  By default, EPIC and Story issue types are not a part of the JSM project.

One possibility will be that you can check if an EPIC with the TEAM ID already exist or not - This is assuming that you are populating your EPIC (at creation time) issue with the same custom field.  If you do, then you can just use JQL to determine if an EPIC with the same TEAM ID are already created condition, then if the EPIC is already there, then don't create the EPIC but just create the Story and associate it to the same EPIC.

Lastly, you should not be creating EPIC/Story issue types in a given JSM project.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Marc Isikoff October 14, 2022

No we are creating Epic + Story in other Jira projects, not JSM.

The point though is we only want one Epic per Team, so if in JSM we took in an issue from that Team when it's time to create Epic + Story in another Jira project, we only want to create a Story not another Epic.

What I'm looking for is how to check if an issue with the same Team ID is already present in JSM in a condition (e.g., what is the JQL) as I've not seen a good example using JQL for existence of any issue with that custom field.

Thank you!

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2022

@Marc Isikoff -

Thanks for your clarifications.  One idea that I would recommend is that when you create EPIC in your Jira project, you need to also populate the Team information in the EPIC issue that you captured from your JSM issue intake.  If so, then you can establish the condition (i.e. JQL to check for EPIC issue existence by the Team information value in your Jira project).  Afterward you can trigger the action to create either the EPIC or Story issue.

The team custom field need to be established in your Jira project associated to your EPIC issue.

Hope this makes sense.

Best, Joseph 

Marc Isikoff October 14, 2022

Joseph,

Thank you, but I like the idea of using JQL to check in JSM before pushing an Epic to another Jira project.

The documentation on related issues conditions is lacking when it comes to checking a field exists so I don't know what JQL to put in for that.

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2022

@Marc Isikoff -

Unfortunately, the out of the box JQL functions for related issues or via automation related issues condition may not be possible.  The key will be to determine if an EPIC exists in your Jira project via JQL, so if the EPIC issue is not also tagged with the Team value, then it is hard to find the EPIC to conduct the check.

I agreed with you that the documentation on Related Issues condition is limited - https://support.atlassian.com/cloud-automation/docs/branch-automation-rules-to-perform-actions-on-related-issues/

Based on my additional analysis - One thing you can check is to see since the the links are created cross-projects, you will need to make your automation rule into global scope.  Here is is a reference for you - https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Automation-for-Jira-related-issues-condition-does-not-work-with/qaq-p/724244

Last point - You may want to contact Atlassian Support (https://support.atlassian.com) for further idea/assistance.

Hope this helps.

Best, Joseph

Marc Isikoff October 16, 2022

Thanks I will contact Atlassian since they do offer a related condition and it has pretty wide scope of if that field value exists but it's relying on JQL to match JQL and no examples exist for this which is puzzling to say the least. 

I cannot imagine no one else has had this issue as you wouldn't want to create duplicates of anything in your system (JSD or Jira project) but Atlassian's documentation is so pedestrian.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events