Forums

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

Don't want Validation Exceptions to Bubble Up

Kelsey Mitchell July 19, 2023

Right now, when an issue is transitioned in a specific project (let's call it Project A). We have an event fire (let's call it Event X). There's a listener for Event X that tries to transition linked issues to the one originally transitioned in Project A. However, if there is a validation error, that error bubbles up to the original transition and Project A's issue isn't allowed to transition and has error

org.ofbiz.core.entity.GenericTransactionException: Commit failed, rollback previously requested by nested transaction.

How do we test transition validation, without calling the validation and having this bubble up? In other words, even if the linked issue can't transition, I still want to be able to transition the issue in Project A.

 

Example

A-123 transitions to Open and fires Event X. B-456 and C-789 are linked to A-123. So in the listntner for Event X (scriptrunner) we try to transition both. B-456 is fine, but C-789 has a validator for a custom field that isn't filled in. So it can't be transitioned. I still want A-123 and B-456 to successfully transition. But right now the error message above is shown on the A-123 screen and it isn't allowed to transition to Open at all.

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
July 19, 2023

Hi @Kelsey Mitchell

Please clarify: are you using the Simple Scripted Validator or Custom Validator for your validator?

Your description sounds like you are using the Simple Scripted Validator. If yes, I suggest changing to the Custom Scripted Validator.

Looking forward to your feedback and clarification.

Thank you and Kind regards,
Ram

Kelsey Mitchell July 24, 2023

There's a couple different transitions this applies to. The one in the example is using the "Field(s) required validator". Others that I'd like to apply the solution to as well do use that "Simple Scripted validator"

Suggest an answer

Log in or Sign up to answer