Forums

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

Check submitted text field for keywords/strings

Mathieu
Contributor
September 7, 2023

Hello Community,

 

I'm currently building a JSM ITSM Project and creating a form for our department site contacts to submit Active Directory access requests.

Is there a way to search what has been submitted in a paragraph field and flag it if it matches certain phrases or text strings?

I want to be able to flag or highlight via Markdown (Bold/Strikethrough) certain restricted security groups, and flag others that may require additional approvals.

 

Is there a way to do this via automation?

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Champion
September 7, 2023

Hi @Mathieu,

Welcome to Atlassian Community!

Yes, that is possible by using smart values in automation. There are multiple ways to find specific phrases, I would recommend that you take a look at the documentation for smart values as a start. For example, you could use replace to find a specific phrase and then replace it with markdown formatting, something like this:

{{issue.summary.replace("Hello","*Hello*")}}

Mathieu
Contributor
September 13, 2023

Thank you for the response Mikael.

The Markdown gets added, but in the Agent View, the text doesn't show up being either bolded or struck through, even though it's set to Paragraph and the custom field is Rich Text. 

{{issue.customfield_10171.replace("FIN_AP_SECOND_BREAKFAST","**FIN_AP_SECOND_BREAKFAST**")}}

At least this does flag it for the Agent, and from there we can train them to verify the group, so I'd deem this successful.

Mikael Sandberg
Community Champion
September 13, 2023

The markdown does not have a ** option, if you want to make the text bold/strong ty using just a single *. You can find all the text formatting notation that is supported here.

Mathieu
Contributor
September 13, 2023

I tried a single *, single -, and some other options from the the text effects, but in the Agent View they don't display. I've used the updated replace field to add additional text to the "replaced text" to ask if it's a proper user.

ex:{{issue.customfield_10171.replace("FIN_AP_SECOND_BREAKFAST","*FIN_AP_SECOND_BREAKFAST* *HOBBIT?*")}}

I was able to chain them all together to flag multiple strings at once, incase they submit multiple restricted groups, but it required a separate Edit Issue for the field, and a "re-fetch issue data" in between each, but I've chained the Automation together to flag for 13 groups.


Mikael Sandberg
Community Champion
September 13, 2023

Okay, since it is a custom field, go to Project settings > Fields and select Actions > Edit fields. On the next screen click on your field configuration and then lookup the field. Make sure that the renderer is set to Wiki Style Renderer. Paragraph fields will by default not be set to that, and will not recognize the markdown text.

Mathieu
Contributor
September 13, 2023

Thank you Mikael

That was the fix,

Markdown now displays correctly in the Agent View. With this in mind I'll update a few other fields.

Like Mikael Sandberg likes this

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