Forums

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

Conditional string only if (smart) variable exists in AQL

Felix Herzog September 10, 2024 edited

Hi,

currently I have following Automation to give our users an overview over their current assets:

Hello {{issue.reporter.DisplayName}}, 
you have {{lookupObjects.size}} assets assigned to you:
{{#lookupObjects}}
{{objectType}}: {{Name}}
--------------------------------------
Hostname: {{Hostname}}
Serial: {{Serial Number}}
SIM number: {{SIM number}}
Last update: {{Updated}}

{{/}}

Some Assets don't have an SIM-Number. SO I want something like:

(following is pseudo-code)

{{if exists {{SIM Number}} SIM number: {{SIM Number}} }}

SO only if a SIM Number Entry exists, the Line "SIM-Number" should be posted.

 

Currently this just keeps empty. 

Is there a way to do so? A sort of conditional output?

 

Thank you

1 answer

0 votes
Vijay Dadi
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.
September 13, 2024

Hello @Felix Herzog ,

Try having If-Else block - that might work out.

Vijay

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, jira product discovery learning path, product discovery training, idea prioritization, align stakeholders, discovery to delivery, product collaboration, atlassian learning, dev process, roadmap planning, insight capture, team alignment

Elevate Your Skills with Jira Product Discovery!

Unlock your potential and learn how to use Jira Product Discovery to your advantage. You’ll have the expertise to revolutionize ideas and insights, roadmapping, engage and align teams and stakeholders, and deliver the best solutions—faster. Enroll today!

Start Learning
AUG Leaders

Atlassian Community Events