Field rename causes to add a new field to components

Hi all,

I have a weird Eschema behaviour when editing custom fields.

I added two custom fields in File > Schematic Setup > General > Field Name Templates. Let’s say Aaa and Bbb.
I used Aaa and filled it with some data for many components, but Bbb was completely empty. Then I renamed Bbb to Ccc (because the new name would better represent what I wanted to use).

Now in the Field Name Templates I can see Aaa and Ccc fields only, but each component has Aaa and Ccc fields as well as Bbb field (the one renamed to Ccc later).

Is that intentional or is it a bug?

Below my KiCAD version info:


Application: KiCad Schematic Editor x86_64 on x86_64

Version: 7.0.7-7.0.7~ubuntu23.04.1, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.1
	libcurl/7.88.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.52.0 librtmp/2.3

Platform: Ubuntu 23.04, 64 bit, Little endian, wxGTK, xubuntu, x11

Build Info:
	Date: Aug 13 2023 23:14:43
	wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.6.3
	Curl: 7.88.1
	ngspice: 38
	Compiler: GCC 12.3.0 with C++ ABI 1017

Build settings:
	KICAD_SPICE=ON

Anything opened with Bbb keeps Bbb as well as showing the replacement Ccc as well as Aaa.

Anything not opened before Bbb is changed to Ccc only has Aaa and Ccc.

Looks like a bug to me.

@jmk - many thanks for checking. I didn’t spotted that, because I’ve had a Bbb field created a few days ago and each components were opened and edited in meantime (with Bbb field not used at all) and no new components added since the rename to Ccc.

Could someone else confirm it please, so I’ll fill a bug report if this is not intentional “feature”

Give me 5 minutes and I’ll check 7.99 to see if there is a similar problem.

1 Like

@greg_m

7.99 behaves exactly the same way as 7.0.7.

Bbbb only shows in symbols that have been opened before Bbbb has been replaced with Cccc.

You might as well go for broke and report the problem for both editions. :grinning:

1 Like

I’m not sure whether or not this is a bug, although it is confusing behavior. Feel free to report it and we can discuss.

The Field name templates are just that: templates – there is not a strong link between the field name template and the fields created from these templates, so currently renaming them works like you describe.

1 Like

Agree.

Give a template a name (without filling in anything), open a symbol, find you need to change the name or correct a typo, correct or change the name. Now you have a single replacement template for all symbols except the one that has been opened which now has two templates.

I’d call it confusing and probably a program oversight rather than a bug. JMHO :slightly_smiling_face:

Theoretically, I suppose the offending template should first be removed and a replacement then added, in which case corrections/changes shouldn’t be allowed.

@greg_m & @craftyjon

This is definitely a bug.

After these actions, try to delete the original template that has been changed and is being displayed on a/some symbols.
It is not possible without deleting and then replacing the symbol/s displaying the two templates.

Is it not possible in the Edit Symbol Fields dialog?

Ha!, sorry, hadn’t thought of the Symbol Fields dialogue, was too engrossed with the Templates.

The fields are removable with the Symbol Fields dialogue.

Correct! This can be deleted only from Edit Symbol Field dialog, but you have to do it for each symbol which doesn’t make sense.
Looks like a bug then.
Will report.
Thank you everyone for your feedback.

EDIT:
I created an issue report there if anyone wants to contribute and comment:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.