ProfessionalWiki / ProfessionalWiki/AutomatedValues

Ignore non property structures to allow more advanced string building

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Description

I would like to create a structure with name (P9) and birth (P19) and death dates (P21):

P9 (P19 - P21)
But if there is no P19 I want
P9 ( - P21)
and if there is no P21 I want
P9 (P19 - )

Currently I cannot configure this. It would be helpful to allow for 'non property paramaters' in the config.

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "P19": " ($",
                    "P21": " - $)"
                }

Ideally I would want to do something like:

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "_1": " (",
                    "P19": "$",
                    "_2": " - ",
                    "P21": "$",
                    "_3": ")"
                }

I tried using other Properties, but it appears that when no $ is found, not string is placed. I.e. this hack does not work:

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "P23": " (",
                    "P19": "$",
                    "P36": " - ",
                    "P21": "$",
                    "P71": ")"
                }

Where P23, P36, and P71 are required fields in the item, so we expect them to be there. But without a $ the line is ignored.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named in the issue. Start by tracing how the shown configuration is parsed and how entries without a "$" are handled; determine how non-property parameters should be represented and verify that missing P19 or P21 still produces the requested surrounding text.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.