Bug 469120 - Advanced Renaming: "Sequence Number" options can not be stacked/combined
Summary: Advanced Renaming: "Sequence Number" options can not be stacked/combined
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-engine (show other bugs)
Version: 8.1.0
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-28 21:30 UTC by michael2macdonald
Modified: 2023-04-29 19:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael2macdonald 2023-04-28 21:30:36 UTC
SUMMARY
When adding a "Sequence Number" to an advanced renaming rule you can add four options: "[c]" = file counter aware, "[e]" = extension aware, "[f]" = folder aware, or "[r]" = random aware. When you apply more than one option (ex: "####[cef]"), it only applies ONE of the multiple provided options by applying the first option to appear in the order "r > c > f > e".

This behavior goes against what both the Digikam application and documentation say. The digikam documentation states "...digiKam will start a new sequence for every file extension and / or folder.", implying that these options can be combined ("AND / or"). Furthermore, the "Information" dialog in the Advanced Renaming tools lists the sequence number command syntax as " #[options]" (plural), again implying that more than one option can be used.

Finally, the renaming rule text highlighting suggests that using two or more options is correct/valid. When adding options to the sequence in the text box, the text will change to red if it detects a sequence with the correct syntax. The sequence will be detected when using one OR MORE valid options (as long as they are in the same order as listed in the info dialog [c,e,f,r]). For example


STEPS TO REPRODUCE
1. Use the Advanced Renaming tool (either alone or part of another tool such as batch queue or import photos)
2. Add a sequence to the renaming rule (ex: "####")
3. Add more than one option to the sequence (ex: "####[cer]")

OBSERVED RESULT
The sequence only applies ONE of the multiple provided options by applying the first option to appear in the order "r > c > f > e".

EXPECTED RESULT
- Multiple options should be able to be combined and used together when generating a number sequence.
- Options should be able to be applied in any order (Ex: "cef", "efc", "fce", ...).
- The only restriction should be that the "Random Aware" (r) option is only valid if used alone or with the "Extention Aware" (e) option and no others, in which images with the same name but different file extensions should have the same random number sequence. If the "r" option is used in combination with an option other than "e", the syntax should be invalid (which will signal this restriction to the user) rather than silently ignoring the other options.
Comment 1 Maik Qualmann 2023-04-29 11:36:04 UTC
Git commit 6785e4bbe01fabc7cc0789648dc21af408fa18ac by Maik Qualmann.
Committed on 29/04/2023 at 11:35.
Pushed by mqualmann into branch 'master'.

implement counter and random aware numbering with extension aware numbering
FIXED-IN: 8.1.0

M  +1    -1    NEWS
M  +13   -5    core/utilities/advancedrename/advancedrenamemanager.cpp
M  +2    -1    core/utilities/advancedrename/advancedrenamemanager.h
M  +19   -4    core/utilities/advancedrename/parser/options/sequencenumberoption.cpp

https://invent.kde.org/graphics/digikam/commit/6785e4bbe01fabc7cc0789648dc21af408fa18ac
Comment 2 Maik Qualmann 2023-04-29 11:38:47 UTC
Any combination would not make sense, for example the option "fe" would be the same as "e". A combination of counter and random aware numbering with extension aware numbering makes sense.

Maik
Comment 3 Maik Qualmann 2023-04-29 19:02:56 UTC
Git commit df3c802c92eed6943d01a3dc3a478e08a36eb91b by Maik Qualmann.
Committed on 29/04/2023 at 19:02.
Pushed by mqualmann into branch 'master'.

add new option to the numbering dialog and fix start/step

M  +19   -22   core/utilities/advancedrename/parser/options/sequencenumberoption.cpp
M  +16   -2    core/utilities/advancedrename/parser/options/sequencenumberoptiondialogwidget.ui

https://invent.kde.org/graphics/digikam/commit/df3c802c92eed6943d01a3dc3a478e08a36eb91b