Forums

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

There are 2 optional user(s) that do not currently exist in Jira and the import cannot create them.

Quinton Lephoto December 21, 2022

Hi Team,

 

The project wizard fails to import and throws this error message:

There are 2 optional user(s) that do not currently exist in Jira and the import cannot create them. We are unable to automatically create them because their details do not exist in the backup XML data. The user(s) are not required to exist for the import to proceed, however you may wish to create them.

The username displayed is: =>70%

I can not create that username on my target instance as some special characters are not allowed and that user does not seem to exist in my sources instance when I search for it.

 

This is what I get when I try searching the logs:

2022-12-19 10:31:57,497+0200 JiraTaskExecutionThread-4 WARN QUINTON12 631x2254x1 vzr0kz 10.1.144.14,172.30.138.176 /secure/admin/ProjectImportSummary!reMapAndValidate.jspa [c.a.j.imports.project.DefaultProjectImportService] There are '2' user(s) referenced that JIRA can not automatically create. You may want to create these users before performing the import.

I tried updating all empty user fields like assignee, reporter etc. and I still get that error message. please advice

 

I tried following this article but I'm not using a UNIX-based operating system so it's tricky to follow hence I opted to update the fields prior to creating the backup file but the issue still persists https://confluence.atlassian.com/jirakb/project-import-fails-with-there-are-required-user-s-that-jira-can-not-automatically-create-865045675.html

Thanks,

Q

 

1 answer

1 accepted

0 votes
Answer accepted
Tom Lister
Community Champion
January 2, 2023

Hi @Quinton Lephoto 

Are you able to find and rename the source users to something without the special characters? looks like it may mean "=>70%" as a user name. Searching for just 70 may locate it. You will definitely not be able to create a new user with special characters in the target system.

Which systems are you moving between? server-server or server-cloud?

On the server you may be able to adapt this DB approach to replacing a username in all locations. Although it is a complex risky option that should be thoroughly tested in test server. Create  new user and migrate references from problem user to the new entry.

https://community.atlassian.com/t5/Atlassian-Migration-Program/Jira-LDAP-Migration-using-SQL/ba-p/942752

Quinton Lephoto January 4, 2023

Hi @Tom Lister 

 

Thanks for the informative response.

I'm still trying to locate the source user as I have close to 91000 items that I need to go through manually. the JQL query is unable to pick it up

We are moving between Server-server

Tom Lister
Community Champion
January 5, 2023

Hi @Quinton Lephoto 

You may find it easier to locate them in the database via SQL. Do you have access to do that?

The SQL will depend on which field is being used.

If you know the field try ordering the JQL using that field. either ASC or DESC sort the special characters to the top. Hopefully < 1000 entries.

Quinton Lephoto January 5, 2023

Hi @Tom Lister ,

Yes, I have access to the DB via SQL on the test instance.

I'm suspecting the field to be either assignee or reporter as the error message is not so clear on which field is the error is thrown so I'll try those fields.

Quinton Lephoto January 5, 2023

 

project = DLSYS2 AND (assignee = 70 OR reporter = 70) ORDER BY assignee ASC

This is the JQL That I tried and I got: 

No issues were found to match your search

Try modifying your search criteria or creating a new issue.

Tom Lister
Community Champion
January 5, 2023

The username may not be 70 looking at the original error.

try

assignee like ’%70%’

etc

Quinton Lephoto January 11, 2023

Hi @Tom Lister 

like does not look like a reserved keyword in JQL, but I see ~ is used for the like keyword that's used in SQL 

project = DLSYS2 AND assignee like "%70%"


Error in the JQL Query: 'like' is a reserved JQL word. You must surround it in quotation marks to use it in a query. (line 1, character 31)


project = DLSYS2 AND assignee ~ "%70%"
The operator '~' is not supported by the 'assignee' field.

seems like I can use the ~ for texts fields only like a summary.

We can try the SQL/DB approach?

Tom Lister
Community Champion
January 11, 2023

Sorry I read your post as using SQL for some reason.

You can't search the assignee for partial matches

 

SELECT id, directory_id, user_name, lower_user_name, active, created_date, updated_date, first_name, lower_first_name, last_name, lower_last_name, display_name, lower_display_name, email_address, lower_email_address, credential, deleted_externally, external_id

FROM public.cwd_user

WHERE username like '%70%'
Quinton Lephoto January 11, 2023

sql results.JPGThanks @Tom Lister 

This is the results

Tom Lister
Community Champion
January 11, 2023

My data base is in a schema called public. I'm using postgres.

Try removing the public. part

Quinton Lephoto January 11, 2023

I tried and it was throwing an error invalid column name. is it because I'm using the embedded DB from script runner?

However, this is what I tried and the results are attached :

 

SELECT *
from jiraissue where project = (select id from project where pkey='DLSYS2') and assignee like '%70%';
pg 2.JPGpg 1.JPG
Tom Lister
Community Champion
January 12, 2023

Hi

This type of issue is not easy to resolve without being on a server and having eyeballs on the actual data.

Your original error contains "The user(s) are not required to exist for the import to proceed, however you may wish to create them.". There is nothing I've read in your question to suggest it is the assignee. It's also suggesting that the import can proceed without them. Is that the case? And can you live with this error? The bad data won't be migrated to the new server.

The value may be in user custom fields. Are you using any?
These values are harder to find

try
Find types of custom fields in use

SELECT distinct customfieldtypekey FROM public.customfield

From the list of types, copy the type keys that look like user fields to form a query for their values

SELECT id, issue, customfield, updated, parentkey, stringvalue, numbervalue, textvalue, datevalue, valuetype

FROM public.customfieldvalue

where id in (SELECT id

FROM public.customfield

where customfieldtypekey in ('com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker'

,'com.atlassian.servicedesk:sd-request-participants'

,'com.atlassian.servicedesk.approvals-plugin:sd-approvals'

))
The user will be in string value as I remember. You can add a clause 'AND stringvalue like '%70%'
also try looking for values like '%=%' as that appears in your example.
Re log output, there may be errors occurring earlier in the log before the final summary error which will provide clues
to create a smaller file that can be shared, go to the logging and profiling and rollover the logs. This will start the logging in a new file.
The run your import and share the log file as an attachment here.
N.B. This may be better reported to Atlassian support as they may have tools suited to resolving this.
Like Quinton Lephoto likes this
Quinton Lephoto January 14, 2023

Hi Tom,

Unfortunatly it's unable to complete the import even though it say's it's an optional value.

Yes, I've contacted Atlassian support and I was advised to search for this user on the entities.xml file and we managed to find the corrupted user on a particular comment. see attached.

Removed that comment and the issue was resolved :) 

Thanks again for your valuable support.

Quintoncorrupted user.jpg

Suggest an answer

Log in or Sign up to answer