- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 08:16 AM
Hello Team,
For UI Action - Create Story
I have this existing query -
(current.incident_state != IncidentState.CLOSED || current.incident_state != IncidentState.CANCELED || current.incident_state != IncidentState.RESOLVED) && (current.u_story.nil()
By this condition, the option of 'create story' is still populating , kindly suggest on this. How we can restrict this ?
Thanks,
Ashwini
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 09:01 AM
Change your ORs to ANDs. Also from the condition you posted, you are missing a ')' at the end of your condition. This may cause an error / always evaluating your condition to TRUE.
(current.incident_state != IncidentState.CLOSED && current.incident_state != IncidentState.CANCELED && current.incident_state != IncidentState.RESOLVED) && (gs.nil(current.u_story)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 09:01 AM
Change your ORs to ANDs. Also from the condition you posted, you are missing a ')' at the end of your condition. This may cause an error / always evaluating your condition to TRUE.
(current.incident_state != IncidentState.CLOSED && current.incident_state != IncidentState.CANCELED && current.incident_state != IncidentState.RESOLVED) && (gs.nil(current.u_story)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 09:33 AM
Thank you for your response.
I found the working code -
(current.incident_state != IncidentState.CLOSED && current.incident_state != IncidentState.CANCELED && current.incident_state != IncidentState.RESOLVED && current.u_story.nil())
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 09:54 AM
good to know, so this missing ")" was main reason.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 09:07 AM - edited 12-15-2023 09:15 AM
Hi @Ashwini Sawant2 ,
Check if the last ")" missing or its just a typo in question.
Also, the given query is condition in UI Action, share the UI Action screen shot.
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution