It's all about the answers!

Ask a question

How to import "Creation Date" and "Create By" using WCL?

Vijayalaxmi B (133) | asked Aug 14 '21, 1:16 p.m.

Using WCL, I am importing the data in .csv and having a mapping file. 

The WI is created successfully with the following warning.

Ignored: Attribute is calculated and can not be set: creator mapped to: creator 'Created By'
Ignored: Attribute is calculated and can not be set: creationDate mapped to: creationDate 'Creation Date'

The "Creation Date" is set as current date and "Created By" is set as current user.
Can you help me to import the Creation Date and Created By from import csv?

Is it possible to set the Creation date with WCL? oe please suggest any other solution.

2 answers

permanent link
Ralph Schoon (62.9k33645) | answered Aug 15 '21, 3:58 a.m.
No, it is not and I am not aware of any API that would allow to.

As the error indicates, the available APIs do not allow to set these attributes. They are automatically calculated and that value can not be overwritten.

permanent link
Davyd Norris (2.1k217) | answered Aug 15 '21, 7:17 p.m.
@Ralph - the Eclipse based importer will correctly import Created By and Creation Date and will set them in the newly created work items. I use this to migrate my clients from Jira to EWM and it did a great job of setting all the creation type attributes.

This makes me wonder if there isn't some way to set this programmatically as Eclipse is based on the Plain Java libraries - although having said that, the importer does seem to be using XML as the upload format.

The only ones it won't do are Modified By and Modification Date on attribute changes, which is a shame because then we would be able to do a complete history import.

It will correctly import comments with the author and date, but I guess this is still a creation type operation.

Ralph Schoon commented Aug 16 '21, 2:26 a.m.

@Davyd, I am aware that some integrations have that capability. I did not know the built in import does it. It might be possible to trace what the rich client code does to get around the plain Java API limitations to make this possible. However, it will likely not be  supported API.

To develop the WCL, I had exactly as much access to the Jazz development team as anyone else on the forum has. So I did not have any support for what could be done with EMF and how to circumvent API limitations. If someone knows how to do this, I am happy to look if I can add a flag or something to WCL to allow this. Otherwise use the WCL to bring in the data and set the creator and creation date in a second rum with the built in importer.

Davyd Norris commented Aug 16 '21, 2:29 a.m.
I think you might have to set the creation data in the first run, then do updates with the WCL. I have only ever set it during initial import - never later as a second step.

Would be worth a try though!

Ralph Schoon commented Aug 16 '21, 2:38 a.m.

Good thought, Davyd! 

Vijayalaxmi B commented Aug 16 '21, 4:14 a.m. | edited Aug 16 '21, 4:14 a.m.

 Thank you Davyd. I will try the solution and let know in the forum here

Your answer

Register or to post your answer.