How can i prevent duplicate issues being created when querying an asset

steven_allcock
Contributor
December 3, 2024

Hello, 

I am trying to utilise Jira, Assets and automation to setup some suppliers that need annual reviews completing, there are a number of supplier and these annual reviews happen all over the year so they have varying last completed dates.

I have setup an automation to run daily and that will query

- What review type is required and if the last completed date is over 275 days

- It then branches to for each: smart value to create an issue

 

My issue is that if it creates it on the first run it will keep creating it daily until the issue is closed which then updates the last completed date. So what i need help with is how can i stop this creating them daily with adding additional attributes to asset field as i did think about an attribute last created but then my assets might be come a bit clunky as there is already quite a lot of dates in there

Any suggestions for how i can filter this in the automation but not exclude the for each: smart value?

image (126).png

image (127).png

 

image (128).png

2 answers

0 votes
Kai Becker
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2024

Hi @steven_allcock 

you could add an additional attribute to the supplier object with the review status.
When you create the issue for the review, you could then set the attribute to pending and exclude all pending suppliers from you initial object search.

When the review ticket is closed, make sure to clear the attribute or set it to something more meaningful, like reviewed.

steven_allcock
Contributor
December 3, 2024

Thank, i did think about this but there is about 5 annual dates which I think would need 5 attributes which could make the asset clunky, i might think about an alternative with a single value though

Like Kai Becker likes this
0 votes
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2024

Hi @steven_allcock ,

You can check if an issue exists for the particular 'Last personal data risk assessment (PDRA)', date before creating the issue.

steven_allcock
Contributor
December 3, 2024

Where would you add this in to automation? Ive not done that before

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2024

You can add a JQL condition with JQL

issuetype = "Personal data risk assessment (PDRA)" and summary ~ "{{issue.\"Last personal data risk assessment (PDRA)\"}}"

Assuming that you use the date in the summary of the issues you create.

 

steven_allcock
Contributor
December 4, 2024

Where in the automation would you think this would go and I can i include the loopup object {{Supplier}} thats created? 

The summary is for the example above is : Personal Data Risk Assessment (PDRA) - {{Supplier}} - 2024 so would this be 

 

issuetype = "Personal data risk assessment (PDRA)" and summary ~ "{{Personal Data Risk Assessment (PDRA) - now.format("YYYY")\"}}"

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 4, 2024

Typically you would add this in the branch just before you create the issue.

You can set the Summary to:

{{Supplier.label}} - {{now.format("YYYY")}}

This will add the suppliers name, assuming that the Supplier object uses the label as the name, otherwise change '.label' to the appropriate attribute.

There is no need to add the PDRA string, because it is already of that issuetype.

 

steven_allcock
Contributor
December 4, 2024

Ah no it doesnt like the JQL on the branch

image (129).png

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 4, 2024

Ah yeah, sorry about that

You first have to do a lookup issue with the query:

issuetype = "Personal data risk assessment (PDRA)" and summary ~ "{{Supplier.label}} - {{now.format(\"YYYY\")}}"

Then add a smart value condition with:
{{lookupIssues.size}} equals 0

Which means that if there are no issues with a certain summary, then continu & create a new issue.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events