Skip to content

profile-generate does not populate profile-param-value-origin in markdown using value from profile.json #1917

@ericslandry

Description

@ericslandry

Describe the bug

When I run trestle author profile-generate... I expect the value for "profile-param-value-origin" to be copied from my profile.json to the markdown file. It is being copied from the markdown to my profile.json when I run trestle author profile-assemble...

To Reproduce

Steps to reproduce the behavior:

  1. Update the value for param-value-origin in my profile.json file
    "modify": {
      "set-parameters": [
        {
          "param-id": "ac-01_odp.01",
          "props": [
            {
              "name": "param-value-origin",
              "value": "This is the new parameter origin value"
            }
          ],
          "values": [
            "This is the parameter value"
          ]
        },
  1. Generate the markdown with:
trestle author profile-generate --output markdown/profile/foo --name foo --overwrite-header-values
  1. See that the ac-1.md still has the old value
  ac-01_odp.01:
    guidelines:
      - prose: This is the markdown prose
    profile-values:
      - 'This is the parameter value'
    profile-param-value-origin: This is the OLD parameter origin value

The other value get updated correctly during profile-generate, but not this origin field. The origin fields gets correctly copied from markdown to the profile.json when using "trestle author profile-assemble..."

Expected behavior

I expect ac-1.md to have the new value

  ac-01_odp.01:
    guidelines:
      - prose: This is the markdown prose
    profile-values:
      - 'This is the parameter value'
    profile-param-value-origin: This is the new parameter origin value

Environment

  • OS: Ubuntu lastest
  • Python version: 3.13.6
  • Installed packages:

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions