Skip to content

Make template tokens work properly for export paths of threads #1123

@CanePlayz

Description

@CanePlayz

Version

v2.40.4

Flavor

GUI (Graphical User Interface), CLI (Command-Line Interface)

Platform

Any

Export format

No response

Steps to reproduce

Export threads and use template tokens in the path

Details

Path parameters need to be rethought with threads because DCE uses the same given path for both channels and threads. That messes with threads. Let's look at the following example:

\\%G\\%P – %T\\%p – %C.html

It essentially means:

Server\\Category\\Channel.html

This should result in the following structure:

Server name
|
|-- Category name 1
|     |
|     |-- Channel name 1 
|     |-- Channel name 2
|     |-- Thread of channel 1

If I export a channel, the term gets evaluated properly.

However, if I export a thread, the term doesn't get evaluated properly. Here's why:

%P – %T will evaluate to the parent channel, because that is "the thread's category", instead of using the server-level category.

Ultimately, this means that you will end up with something like this:

Server name
|
|-- Category name 1
|     |
|     |-- Channel name 1 
|     |
|     |-- Channel name 2
|
|-- Channel name 1
      |
      |-- Thread of channel 1

Possible solutions would be:

  • Let the user pass separate paths for threads and channels
  • Just evaluate the given path for channels. For threads, evaluate the same term for the parent channel and put the threads inside whatever folder their parent channel is in.

The first option would be more flexible, and clearer to the user. However, we'd need two more parameters: one for the name of a parent channel and one for a thread's name.

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that that this bug is reproducible on the latest version of the application
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions