Skip to content

Fix "Joint comment" link logic to check Commenter role count #7039

@patphongs

Description

@patphongs

Summary

What we're after:
Fix the logic in the rulemaking template that determines when to display "Joint comment" vs. individual commenter names. Currently, the template checks the total number of entities to decide the link text, but it should instead check the number of entities with role == "Commenter".

You can use Rulemaking 2024-01 as an example.

Technical considerations

  • Changes should be made in the python view and not jinja template

Completion criteria

  • When there is exactly 1 entity with role == "Commenter":
    • The link text should display: [Commenter Name] | Commenter
    • All doc_entities should be listed below as indented items
Image
  • When there are 2 or more entities with role == "Commenter":
    • The link text should display: Joint comment
    • All doc_entities should be listed below as indented items
Image

This ensures that documents with multiple entities but only one actual Commenter will display the commenter's name instead of incorrectly showing "Joint comment".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🔜 Sprint backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions