- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 11:15 PM
I have a UI Action that needs only to be available based on the Short Description. Below is the Condition, the button should not show if the Task Description contains Development and Analysis but it doesn't work. Please help. Thanks.
current.state != 3 && ( current.short_description.indexOf('Development') == -1 || current.short_description.indexOf('Analysis') == -1)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 11:31 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 11:31 PM
Change the condition to '!= -1 '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2020 11:36 PM
Do you mean that both "Development" and "Analysis" should not be part of the description or only one of them?
If the button should not be visible for a description "Development not working" or "Analysis has to be done" then you need the following description. (Keep in mind that the UI Action condition is only checked on load and not if the short description changes).
current.state != 3 && current.short_description.indexOf('Development') == -1 && current.short_description.indexOf('Analysis') == -1