Forums

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

Can't get smartvalue fallback to work in Edit Issue automation node

Josh Schoenick
Contributor
January 17, 2025

<TLDR;> Trying to use fallback smartvalue feature to populate a custom field option on Edit Issue like this.
{{customfield value|Static Value}}  {{issue.customfield_13867.value|IT Cellular}}. that doesn't work

<Full Details>
I have an issuetype of IT Request. We have several Request types that share that issue type. On the screens for that issue type we have a custom field (customfield_13867) called "IT Support Tier" which have about a dozen options, let's pick two: IT Cellular and ITSD Gatekeepers.

I've added this field as hidden and empty on the the different Request Types. This allows us to show the field when an Agent creates a ticket inside Jira via the [Create] button.

fallback-portal.pngfallback - form.png

In an automation triggered on Issue Created I set the IT Support Tier field using Edit Object based on a mix of fields like Request Type, Priority, Category, etc. That's working great.

I received a request from the team that they want to be able to override the automation rule setting of the tier.  If they choose "IT Cellular", they don't want the Edit Issue node to set it to "ITSD Gatekeepers" like it currently does.

Oh, and I'm at my 64 nodes in this automation, so that's why I'm not looking to split each If into double the nodes and attempting to use "Fallback" functionality.

Here's what I tried an the results:
1. I created a variable called {{UserSelectedITSupportTier}} and populated it with {{issue.customfield_13867.value}}

fallback-treevariable.png

fallback-variable.png

2. In the if/else condition for the scenario I'm looking for, I have an Edit Issue node I was setting it to "ITSD Gatekeepers". But to override that with user selected value in the customfield I was trying to use the "fallback" or "default" functionality of smartvalues.  {{UserSelectedITSupportTier|ITSD Gatekeepers}}.  I'm using action log to view the values.


fallback-tree-ifstatement.png
fallback-editissue.png

3. If IT Support Tier field is populated, it is returned selected ("IT Cellular") but if it's empty it the fallback isn't working and nothing is returned. This is true used in an Action Log and Edit Issue node.

variable-actionlog.pngfallback-tierpopulated.pngfallback-tierempty.png

4. I also attempted to use {{#if(no(issue.customfield_13867.value.isEmpty))}}{{UserSelectedITSupportTier}}ITSD Gatekeepers{{/}} and that also doesn't work.

 

I'm needing to lean on someones experience for help on this one. I'm hoping it's simply a syntax issue.

1 answer

0 votes
Valerie Knapp
Community Champion
January 19, 2025

Hi @Josh Schoenick , thanks for your post. 

I have a question for you about this automation. As you say, it's already very complex and delicate in terms of the configuration.

This change request from your colleagues, is this to deal mostly with exceptions? If that's the case, could you instead have a global transition with a transition screen with just this field in the workflow? With the workflow transition, for the end user, it's an issue action and with it being in the workflow, you can also use conditions to limit who can access this action and also have validators to again control somewhat what people can change the field from and to.

What do you think? Would this be feasible for your use case or am I missing something? 

Best of luck with this. 

Cheers

Josh Schoenick
Contributor
January 22, 2025

Great points, the piece that I can't believe I forgot to mention, but I did, this is withing Jira Service Management. When a user submits request via the portal, I want to use If/Else conditions (several of them) to determine proper IT Support Tier.

However, it it's submitted via an Agent from within JIRA using the [Create] button, I want to use that value.

But your question leads me to the concept of simply cloning the rule and add a condition at the top for Portal vs Non-Portal submission.  hmm.

Josh Schoenick
Contributor
January 22, 2025

We are setting this upon create.

Suggest an answer

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

Atlassian Community Events