It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Query Issue custom field can't return correct value unless issue is opened in browser

Here's the scenario:

1. I've setup a "Linking issue" custom filed with "query issue come filed" and setup the JQL to fill in the issue in this field. this custom field is named "father_project"

2. I use scriptrunner to set value to this custom field to one issue like this

FatherProjectCustomField.updateValue(null, childTicketIssue, new ModifiedValue(childTicketIssue.getCustomFieldValue(FatherProjectCustomField),FatherProjectIssue.getKey() ), new DefaultIssueChangeHolder())

3. I search issue in JIRA with "father_project = xxx", it return null

4. I open child issue, and check the value in father_project filed, the issue key is correct

5. then I searched issue in JIRA again with "father_project = xxx", it return the child key

it seems that when the code write the value, but JIRA doesn't recognize it until the child issue is open in browser.

It look strange, and I want to find a way to write this custom field value correctly, so that I can get the query result directly in code without opening the child issue on browser UI.

1 answer

1 accepted

0 votes
Answer accepted

I fixed this issue by using ScriptRunner issue picker instead of query issue custom field

Veera Atlassian Team Jan 18, 2020

Glad to know that you were able to figure it out and fix the issue. Thanks for sharing @jane chen .

Thanks for your attention. I just can't understand what happened to the custom field and had to find alternative way. :)

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you