Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

IssueService transitioning an Issue multiple times validation error

Sandor Krisztian Andre March 10, 2017

Hi I am faced with a strange problem. I am using the IssueService to transition an issue in the standard way. First validate then check the validation result then transition. I use the resulting MutableIssue to transition the issue again. This all works in my dev instance but it results in a failed validation in my test instance. If I execute the command again then the issue makes the second transition. Can this be a timeout issue (the test instance is much slower)

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 12, 2017

You are welcome smile.

To be sure about IssueService you  can check the JIRA sources.

0 votes
Sandor Krisztian Andre March 12, 2017

I have no access to the log, but the issue is solved I think. I didn't call isValid() on the transition result and as it seems the IssueService.transition is asynchronous therefor the previous transition hasn't finished yet when the next one was called(on a heavily loaded system). I believe isValid() will only return when the transition has completed and thus can act as sync mechanism. I still need to test this on the test system.

Thank you for your help!

 

 

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2017

Did you check the logs?

0 votes
Sandor Krisztian Andre March 10, 2017

I have no access to the test instance and can't easily install a new revision which would print the Error. The dev and test instances have the same workflow, configuration, conditions, rights, project schema and data, I made sure of it. The difference is performance, the test system is heavily loaded. I strongly suspect that the only explanation to this behavior is a race condition. Is it possible that the previous transition has not yet completed yet when the next is called (this implies some async implementation on db level or otherwise) and then the second transition is blocked? How can I make sure that the previous transition has finished before I call the next one?

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2017

First of all you need to check the validation errors. Production and dev have different workflows and so it can work on the dev and return errors on the test instance.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events