View Issue Details

IDProjectCategoryView StatusLast Update
0021693mantisbtadministrationpublic2016-09-30 14:40
ReporterKenMcGinnis Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformWindowsOSWindows Server 2012 R2OS VersionServer 2012 R2
Product Version1.3.1 
Summary0021693: Copy of Versions from one project to another project does not copy all fields
Description

Copy of Versions from one project to another only copies the version field. Other fields are missing. See steps to reproduce below.

This will copy all of the current versions from the current project to the selected project. The Version field is copied but the other fields are not. For example if you examine the database table "mantis_project_version_table" you will see that the field date_order is not populated but instead contains a value of 1. I think the released field may not be copied correctly either. Maybe others.

I think all fields should be copied from the current project to the new project id for all version records.

Steps To Reproduce

Manage -> Manage Projects -> Select a project to work with -> scroll down to Versions -> From the Combo Box select another project -> click the Copy Versions To button.

Additional Information

I had to do my own sql update queries to copy the dates and released fields.

TagsNo tags attached.
Attached Files

Relationships

related to 0008094 closedvboctor Managing versions / release schedule accross multiple projects. 
related to 0010242 closeddregad Copy Versions From / To should (optionally) update existing versions 

Activities

dregad

dregad

2016-09-16 03:11

developer   ~0054029

The Version field is copied but the other fields are not.

I did a quick test which confirms that copying versions DOES include "other fields" (as evidenced in the code [1]), with the exception of the "obsolete" flag, as obsolete versions are not copied (which I assume this is by design although this is not documented, see 0008094)

Are you running a customized version of Mantis ?

[1] https://github.com/mantisbt/mantisbt/blob/release-1.3.1/manage_proj_ver_copy.php#L79

KenMcGinnis

KenMcGinnis

2016-09-16 17:45

reporter   ~0054030

No, it's not a customized version. Not sure why it didn't copy the Date Order field for me. See attached screenshot.

I copied from project 4 to project 6 all versions. The screenshot shows the differences.

Thanks for sharing the source code. It appears it should copy everything. If I do the copy again it does not update existing ones. That would be nice as that might solve the problem.

z4.jpg (259,855 bytes)   
z4.jpg (259,855 bytes)   
dregad

dregad

2016-09-17 08:13

developer   ~0054034

I can't explain why the date order was not copied, I'm not able to replicate this behavior, so I'll resolve the issue. Feel free to reopen it if you can provide steps to reproduce.

With regards to updating existing versions in the target project when copying them, I think that's an enhancement that makes sense. In fact it's already logged under 0010242, so please follow-up there.