Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 440 - Metadata Editor: Tags without values can't be added
Metadata Editor: Tags without values can't be added
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.1.3
Per OS All
: P4 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-01 12:51 UTC by Gale Andrews
Modified: 2019-08-09 10:13 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
1. Exit Audacity. Delete audacity.cfg. 2. Launch Audacity, Edit > Metadata... 3. Double-click underneath "Comments" in the "Tag" column and add a custom field, for example "Composer". Don't click in the "Value" column. Click OK. 4 Reopen Edit Metadata tags. The "Composer" tag is not present. Audacity should have stored the new field in memory, but doesn't. 5 Add another custom field without clicking Value then click "Set Default" then OK. 6 Restart Audacity then File > Open Metadata Editor... . The "Composer" tag is not visible and no [Tags] entry has been created in audacity.cfg. 7 Repeat step 3 but also double-click in "Value" and add an empty space. Repeat steps 4, 5 and 6 and you will now have the "Composer" tag with an empty value you can fill and audacity.cfg has been populated with a [Tags] entry.
Release Note:
First Git SHA:
Group: Metadata
Workaround:
Closed: 2019-08-09 00:00:00
james.k.crook: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments
Patch provided by Kelson (1.45 KB, patch)
2015-03-10 11:40 UTC, Steve Daulton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2011-08-01 12:51:51 UTC
Same issue if you save and load a template. The only way you can add a tag without a value is to add a space in "Value" (which few users will think of doing).
Comment 1 Steve Daulton 2015-03-10 11:40:46 UTC
Created attachment 583 [details]
Patch provided by Kelson

Patch transferred from forum topic: 
http://forum.audacityteam.org/viewtopic.php?p=264895#p264895
Comment 2 Gale Andrews 2015-03-14 20:33:54 UTC
Thus compiles and works OK for me on all three platforms.
Comment 3 Steve Daulton 2015-11-11 06:49:01 UTC
The patch still applies OK (just a couple of lines offset) and still works OK here. I've assigned it to myself as a reminder to commit it when the 2.1.2 freeze ends.
Comment 4 Steve Daulton 2016-01-20 19:03:45 UTC
Committed https://github.com/audacity/audacity/commit/23186f9bf
Marked as Fix Made.
Comment 5 Peter Sampson 2016-02-20 07:26:48 UTC
(In reply to Steve Daulton from comment #4)
Testing on Mac El Capitan on 01a95c5-2.1.3-alpha-13-feb-16
and
Testing on W10 on aud audacity-win-rf933621-2.1.3-alpha-19-feb-16

Tests ok on both platforms 

Note the command for metadata editing has now changed to "Edit Metadata Tags"
Comment 6 Gale Andrews 2016-04-13 11:18:27 UTC
Still works for me on Linux Ubuntu 14.04 32-bit.
Comment 7 Gale Andrews 2016-10-16 12:19:09 UTC
Something has broken the fix. REOPENED.
Comment 8 Steve Daulton 2016-12-21 07:10:15 UTC
(In reply to Gale Andrews from comment #7)
Broken by fix for bug 1382
https://github.com/audacity/audacity/commit/79eeb03
Comment 9 Gale Andrews 2016-12-21 09:41:10 UTC
(In reply to Steve Daulton from comment #8)
> Broken by fix for bug 1382
So, the fix for this bug 440 must take into account bug 1382 which must then be retested.
Comment 10 Steve Daulton 2016-12-21 10:03:59 UTC
(In reply to Gale Andrews from comment #9)
Although the symptoms are the same now as when this bug (440) was originally opened, the original bug 440 is still fixed. The problem is that the fix for bug 1382 has caused a new bug with the same symptoms as the original bug 440.

The problem now is a direct result of
https://github.com/audacity/audacity/commit/79eeb03

Each tag is a name / value pair.
If a new tag is added without a value, it is being deleted:

   if (value.IsEmpty()) {
      // Erase the tag
Comment 11 Peter Sampson 2018-08-11 11:02:54 UTC
(In reply to Steve Daulton from comment #10)
>If a new tag is added without a value, it is being deleted:

I think this is reasonable behavior


I assume that here Stev is quoting from the code:

   if (value.IsEmpty()) {
      // Erase the tag

If so, then this is intended, designed, behavior

And we can document this behavior in the Manual

And this this "bug" is an enhancement request
Comment 12 James Crook 2018-08-11 17:12:47 UTC
REOPENED.

Steve wrote:

The bug is a regression.

If I create a template with a custom field, I would expect that custom
field to be present when I come to use it, not to magically disappear
without notice.
Comment 13 James Crook 2019-07-17 10:15:16 UTC
DEVEL - FIX MADE
https://github.com/audacity/audacity/commit/9d1b75a5d75ad6f5449c22e5cace83f4aa387c10

Bug 1382 will need retesting.
Comment 14 Peter Sampson 2019-07-18 04:27:14 UTC
(In reply to James Crook from comment #13)
Testing on W10 with audacity-2.3.3-alpha-296-13348841c038bdd7614ae9e401ad0a419f7fb44a

This nowrks properly on Windows.

In particular, at Step 4 the Composer tag is present.

But further testing around the editor shows no untoward behaviors
Comment 15 Peter Sampson 2019-07-25 07:51:41 UTC
(In reply to James Crook from comment #13)
Testing on macOS 10.14.5 with mac 2.3.3 alpha jc004 of 25Jul19

This now works properly on Mac.

In particular, at Step 4 the Composer tag is present.

And further testing around the editor shows no untoward behaviors
Comment 16 Steve Daulton 2019-08-09 10:13:51 UTC
Works for me on Linux.