Opened 13 years ago

Closed 13 years ago

#3857 closed bug (fixed)

Shapefile cannot be saved if joined table contains field names longer than 10 characters

Reported by: bnotter Owned by:
Priority: minor: annoyance Milestone: Version 1.7.0
Component: Vectors Version: Trunk
Keywords: table join, shapefile Cc:
Must Fix for Release: No Platform: Linux
Platform Version: Ubuntu 10.10 Awaiting user input: no

Description

A layer with another table joined to it using attribute values (as possible from QGIS 1.7) cannot be saved as shapefile if the joined table contains field names longer than 10 characters.

In versions <= 1.6, when dynamic attribute join was not possible but joining attributes was done using fTools by permanently saving into a new dataset, field names longer than 10 characters would just be truncated. It would be nice if this behaviour was re-introduced for the dynamic table join

Change History (2)

comment:1 by bnotter, 13 years ago

Priority: major: does not work as expectedminor: annoyance

Sorry, my observation on this bug was not correct:

The problem is not, as described above, that too long field names are not truncated, but that if they are truncated, they may not be unique anymore. This in itself is not a bug but expected behavior.

However, what could be expected is that if tables are joined, the resulting combined attribute table would not contain both the join field in the joined table AND the target field in the layer it is joined to, but only one of them (since both contain the same information anyway). Because often, the join field and the target field are named the same. If that is the case, the resulting combined attribute table cannot be exported, and this will force the user to rename one of the fields and set up the join afresh.

I would therefore propose to only keep the target field in the resulting combined table in order to avoid this problem.

I'm also changing the priority of this bug down to "minor: annoyance".

comment:2 by mhugent, 13 years ago

Resolution: fixed
Status: newclosed

This is a good suggestion, implemented in 3ac604ff1be4676e69e2.

Note: See TracTickets for help on using tickets.