Forums

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

Inconsistent issue data for bug, Jira 8 ( Issue issue = issueManager.getIssueObject(DefectId);)

Satish Chitimoju
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2019

Hi Team,

      Could you please help me out,

  I have a scenario like,

  • I created a bug with initial status TO-DO  and created 3 issues (issueType=Test), and map the bug to three issue (issueType = test). 
  • Now i changes the bug status to In Progress then i will impact for all three issue (issueType=test), But i am getting inconsistent data while getting the issue object.
  • below logic in a loop (3 times) and i passed  defect id to get issue Object, Here i got first record bug status is TO-DO and remaining 2 records bug status is In Progress. But expected result is all three records should be In Progress.   com.atlassian.jira.issue.IssueManager and getting issue data, which is inconsistent in jira 8 version.
  • Issue issue = issueManager.getIssueObject(defectId); 

Customers are facing problem because of this. Please guide me.

Could you please help me out. then we will change our code base accordingly.

 

Thank you,

Satish C,

1 answer

0 votes
Tuncay Senturk _Snapbytes_
Community Champion
March 18, 2019

Hello Satish,

Please clarify more

Are you trying to create a workflow post function to transition the related tasks?

Can you share your code? Are you getting any error/exception? Or the problem is uncompleted transition for the two related issues?

Thanks

Satish Chitimoju
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2019

Hi Tuncay,

      It is a webhook event, I didn't get any  error/exception. I got inconsistent data.

I share the basic code where i got the problem, from this jira package com.atlassian.jira.issue.IssueManager,

webhoook event is >> Issue issue = IssueMannager.getIssueObject(jira_defectId);

scenario : While i change the jira bug status from TO-DO to In Progress in jira 8, then i used to get the issue data using above event. instead of in progress status it is getting TO-DO.

I have passed different defect ids to this above webhook event, but i didn't get expected result, example If i selected In progress status for that particular defect, instead of        In-Progress status this webhook event result is TO-DO some times.

Please help me out.

Thank you,

Satish C

Tuncay Senturk _Snapbytes_
Community Champion
March 19, 2019

Hello Satish,

I'm not sure but it sounds like a race condition.

The issue fires the event just before persisting to database.

Is it possible to wait a while before running  issueManager.getIssueObject(jira_defectId) code?

Suggest an answer

Log in or Sign up to answer