How to resolve "Cannot get property 'query' on null object" in project configurator plugin?

I am facing this issue while exporting a project in jira:

"Cannot get property 'query' on null object

I face this issue when i select the option "Shared with exported projects " in Filters to export and Dashboards to export. 

Error (JIRA).PNG

My jira version is 7.3.8 and i am using jira configurator plugin to export a selected project in jira. 

Please help me to resolve this issue. 

Thank you

 

3 answers

1 accepted

1 vote
Answer accepted

Hi Shriya,

Thank you for your question.

I can confirm that the error message above indicates that an agile board is being exported from the source instance which does not have a filter configured for it, as the filter associated with it has been deleted.

The workaround for this issue is to identify the agile board or board(s) which have an invalid filter which you can do by running the SQL query below in the JIRA Database on the source instance.

select b.NAME, b.SAVED_FILTER_ID, f.filtername, f.reqcontent 
from AO_60DB71_RAPIDVIEW b left 
join SEARCHREQUEST f on b.SAVED_FILTER_ID = f.id 
where f.id is NULL;

Once you have identified the board with the missing filter you can then either remove this board or update it to use a new filter which exists before taking a new export to import from. The Atlassian article located here outlines how you can associate a new filter to the invalid board inside the database.

We are currently working on improving the message thrown when this error occurs and plan to release these improvements within the next version.

If this answer has solved your issue can you please accept it in order to mark this answer as correct for users who are searching for a similar issue.

Regards,

Kristian

Hi @Kristian Walker

 

Thank you for your reply.

Currently I am able to export the project using some other configurations. But now I am facing the issue while importing the same project.

When I try to import the project, I exclude some of things like Users, Groups, Custom Fields, Field Configurations, field configuration schemes, Scrum and Kanban boards. But when I start importing it, it shows the error (see attached screenshot)

 

Does issue types/fields etc doesn't gets override when we import the project and if already exists in destination Jira?

Currently it is showing of one issue type named "Test", but later when it gets resolved it might show the error for other fields. Do we have any work around for this? Can you please help?

 

Thanks and Regards

Shriya ChhajedJira import error.PNG

Hi Shriya,

I can confirm that the error shown in the screenshot above indicates that there is already an Issue type of Test inside of the target instance that you are importing into.

Issue type names are case sensitive so an issue type with the same name in a different case such as 'test' would be classed by the importer as the same issue type.

Also Standard and Sub-Task issue types can not have the same names meaning if you are importing a standard issuetype and their is a sub task with the name of test then you will get this error.

The workaround for this error is to review the issue types in the source and target instance and to update the names to the same case if the issue types are the same type,  or to rename one to be unique if they are of different types.

Once one of these actions has been taken then a new export should be taken from the source instance to import from.

Regards,

Kristian

Hi Kristian,

 Thank you so much. That helped us and now we are not facing the same issue :) 

 

Thanks and Regards

Shriya Chhajed 

Hi Shriya,

Thank you for confirming the solution worked.

Can you please mark the answer as accepted so that other users searching for the same question can see that this marked as a valid solution.

Regards,

Kristian

Hi Kristian

 

Yeah sure. Will do that. But mainly your reply regarding the issue type names helped(reply of the above message). I hope that will help other people too :) 

 

Thanks and Regards

Shriya Chhajed 

I'm having the same issue today when trying to export a project using the Jira Configurator Plugin.

Hi Evy, 

 

Please try the same solution. I hope that will help. 

If not, then please post the screenshot of your error with details. 

 

Thanks and Regards

Shriya Chhajed 

Hi Kristian, 

 

There is an another issue which i am facing while importing the project. This time i am importing all the projects from one instance to the another. And like before i am skipping the users, groups and boards while importing and using the same options as before. 

Please find the attached error which i am facing, which is something related to corrupt zip file i think. Please suggest. 

 

Thanks and Regards

Shriya Chhajed jira import issue.PNG

Hi Shriya,

The error inside your screenshot above indicates that the Zip file being imported is corrupted which could of happened during the data transfer from the source instance to the target instance.

In order to validate the file could you please check the following.

  1. That the file contains an extension of .zip on the target server.
  2. That the file can manually extracted using a Zip tool such as 7Zip.

If the file cannot be successfully opened then you will need to take a new export from the source instance and transfer this to the target instance to import from.

Regards,

Kristian

Hi Kristian,

 

I tried doing both the things: 

1. yes it contains the .zip extension at target server

2. When i try extracting it using 7Zip, it reached till 100% to unzip the file but at last it shows "Headers error"

Also tried creating the new export file from the source instance, but the same error occurs while importing it in target instance. There is no error while exporting it when in source instance. 

 

 Can you please suggest the workaround for this error, i am stuck with this and not able to complete it. 

And also is it possible if i remove the Attachments folder before exporting it (because the path specified in the error is something related to attachment, though not bale to get the exact file location), so that this error can be resolved?

 

Thanks and Regards

Shriya Chhajed 

Hi Shriya,

Thank you for your response.

We believe that this error is being caused by a corrupt attachment inside the attachment directory being backed up, and that this attachment is causing your export to fail.

To work around this you could take a copy of the source instance without attachments over to a local server to take the export from.

Regards,

Kristian

Hi, 

 

The error of attachment is resolved, and it was due to some attachments only. 

But now i am facing a new error. When i try to import a simple project from source jira to destination jira server with the help of project configurator, i am facing this issue which is somehow i feel related to custom field and plugins. 

The plugins which are on source jira server are available on destination jira server as well. And the project which i am trying to import is very simple software project with only1 or 2 issues in it. Can you please help me to resolve this? 

 

Attached is the screenshot of the error. DC6991.PNG

Thanks and Regards

Shriya Chhajed 

HI Shriya,

The error shows that versions of the plugins are different between  the source and  the target instance.

In order to resolve this error you will need to update the plugins on the source instance to be the same as the target instance.

I have indicated below what version each plugin should be on the target instance.

  • ScriptRunner - Version 5.3.9
  • Jira Misc Custom Fields - Version 1.7.2

Also the error indicates that you do not have the Jira Charting plugin  installed and this needs to be downloaded from here and installed on the target instance before re running the import.

Thanks

Kristian

Hi Kristian, 

 

Thank you so much for the response. 

Okay will check the plugins and their version. That might help. 

 

Thanks and Regards

Shriya Chhajed

Hello Kristian,

 

I am working with Shriya and helping her in this ongoing initiative of project migration in our organization. 

We have been trying your suggestions with failure and success both and also have been adopting our own R&D. 

At the last we have tried to import only the Project configuration of a single project which seems to be working for us though not fully successful. It does create the project for us and its schemas etc. But when it tries to create its boards it fails with an error message. This is what we are trying step wise step.

1) Export single project from Source Jira. Select Configuration only. Custom fields: only those used in project, User and groups: none, Filters: Shared with exported projects, Dashboard: none, Scrum and Kanban board: Associated to exported projects.

2) Import the project configuration on the target Jira system. 

3) Import creates the project, field configuartions, filters. But when it reaches to created Scrum board it fails with error about quick filters with following message.

 

"

INFO 13:57:18,771 [Filter New OCES test by spede] Modifying query to: project in ("NemID Privat ADAM", "NemID Erhverv ADAM") AND status in ("Ready for Test", "Ready for System Test", "Ready for Deployment", "Issue Impeded", Resolved) ORDER BY Rank
WARN 13:57:18,783 Skipping all dashboards...
INFO 13:57:18,910 [Scrum board MOCESII DEV board ORIGINAL with filter localadmin@@MOCES2 alle JIRA] Modifying quick filters
ERROR 13:57:19,038 com.awnaba.projectconfigurator.utils.errorhandling.ServiceResultException: ErrorCollection[errors=[ErrorCollection.ErrorItem[contextId=query,messageKey=The value 'Dev Jira' does not exist for the field 'filter'.,params={}]],reasons=[]]
at com.awnaba.projectconfigurator.utils.MiscUtils.processServiceOutcome(MiscUtils.java:152)
at com.awnaba.projectconfigurator.jiraobjectfacades.AgileBoardToolsImpl.setQuickFilters(AgileBoardToolsImpl.java:973)

 

"

and then comes out of the process. Though, it manages to the create the scrum board in which it throws the error. I can also see the main query filter created with correct owne and permissions. But it fails to create the quick filters

I have also checked the permissions of the query and shares and it is shared to my id and group. But I dont know how to check the permissions of the quick filters.

 

Can you please guide us further on how to resolve this issue. We feel that we are quite near to our goal.

 

Regards

Sanan

Hi Sanan,

Thank you for your response.

I can confirm that the error above indicates that their is a quick filter on the MOCESII DEV board ORIGINAL Scrum Board which has a reference to field called filter which it expects to have a value of Dev Jira.

The reason that it is failing is because it cannot find this value as an option for the field. 

In order to overcome this error can you please ensure that in the source instance that this value exists for the field and that the options contains no whitespace at the start or end of it as whitespace will cause the option to be found.

Once the option is fixed in the source instance then you can take a new export to import from.

Alternatively you can remove the quick filter referencing the field from the board and take a new export to work around the issue.

Please let me know if you have any further questions. 

Thanks

Kristian 

Hi Kristian,

 

your suggestion has worked for us. I removed the the quick filters in question and after fresh export it did not give the same error. But this time it is throwing an error about something else, which I am not able to figure out as I am unable to find anything. Its shows it when I import it.

 

*************

INFO 08:30:06,500 [Kanban board New OCES Test with filter spede@@New OCES test] Modifying kanban subfilter to fixVersion is not EMPTY and fixVersion in unreleasedVersions() AND fixVersion not in ("N/A", "No version")
INFO 08:30:06,509 [Kanban board New OCES Test with filter spede@@New OCES test] Modifying columns
INFO 08:30:06,559 [Kanban board New OCES Test with filter spede@@New OCES test] Modifying column constraint criteria to NONE
INFO 08:30:06,564 [Kanban board New OCES Test with filter spede@@New OCES test] Modifying swimlanes
ERROR 08:30:06,568 com.awnaba.projectconfigurator.utils.errorhandling.ServiceResultException: ErrorCollection[errors=[ErrorCollection.ErrorItem[contextId=query,messageKey=The value 'TU example 1.175.0' does not exist for the field 'fixVersion'.,params={}]],reasons=[]]
at com.awnaba.projectconfigurator.utils.MiscUtils.processServiceOutcome(MiscUtils.java:152)
at com.awnaba.projectconfigurator.jiraobjectfacades.AgileBoardToolsImpl.setSwimlanes(AgileBoardToolsImpl.java:1210)
at

.

.

.

.

.

******

 

I assume it is giving error about an query filter called New OCES test. 

But when I check this filter in the source Jira, it does not show me anything about fixVersion in it. The query used in this filter is :

 

"project in ("NemID Privat ADAM", "NemID Erhverv ADAM") AND status in ("Ready for Test", "Ready for System Test", "Ready for Deployment", "Issue Impeded", Resolved) ORDER BY Rank"

 

What should I do about this?

 

Regards

sanan

Hi Sanam,

The error indicates that is related to the swimlanes for the board as it occurs when it is trying to create the quickfilters which are used to define the swimlanes.

The error is saying that one quick filter is searching for the fix version of TU example 1.175.0 which does not exist.

To work around this error you will need to review the board in the source instance in order to find the swimlane which references this invalid filter and to remove the reference to it before taking a new export to import from.

Regards,

Kristian

Hi Kristian,

 

thanks again for you prompt reply. 

Actually, I found the error. My mistake was I was checking in wrong board which had almost similar name. After correcting the problem in the correct board the error disappeared and now we have managed to import project configuration and its data successfully. But we had to take a little unconventional approach. 

First we imported only the configuration of the projects and after that we imported the project data with configuration but since configuration was already imported so we excluded all the configuration items in the second attempt. This helped as it did not create any problem for us as it was doing when we tried to import data and configuration at the same time.

Now we can see that project has come with its all the schemas, versions, components and boards, filters etc. and, the number of issues imported is same as it is in the source Jira.

But I still see one problem. There are some fields in the issues which have not receive their values. For example there is a field called BU Priority which has value in it for the issues I checked in the source Jira but when I cross check in the target Jira system those values are not there and hence those issues are not searched by filters where those values are important and so do not show up in the boards.

Have you any idea about this, and how to go about it? And what information do you want me to send you to understand this?

 

Thanks

sanan

Hi Sanan,

Thank you for your response.

When you generated the export can you please verify if you set the Filtering custom fields drop down to have the value of All or Only those used in Projects.

Also, can you confirm if in the approach you used if you used  Project Configurator to import the issue data or if you used the built-in Jira data import functionality?

I would recommend deleting the imported project and to re-import the project again without skipping any configuration objects as skipping these could have caused the option values for custom fields not be created.

If you ensure the custom field options exist then these should get populated when the issue data is re-imported.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Jira

Updates to jira.atlassian.com give you visibility into what's coming in Jira Server and Data Center

Hello, Community! My name is Gosia and I'm a Product Manager on Jira Server and Data Center here at Atlassian. Since 2002 when we launched our public issue tracker, jira.atlass...

765 views 1 17
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you