Bug 26746

Summary: Variables available for selecting into notices are misleading
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: NoticesAssignee: Martin Renvoize <martin.renvoize>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, emily.lamancusa
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 15277    

Description Martin Renvoize 2020-10-20 09:43:22 UTC
The list of variables available to selectively add to a notice can be misleading.  They are currently a list of database field names selected by the module which the notice has been assigned to.. however not all notices actually pass all these tables into GetPreparedLetter and so not all variables are always supported and sometimes additional 'hidden' ones are available.

We should clarify this and add support for TT variables at the same time.

I believe we could/should do this within C4::Letters itself with a configuration block that lists accepted variables (tables, substitutions, loops etc) which can then be used both to construct the lists in the UI and also to check that the calls to GetPreparedLetter are indeed passing in the required/listed variables we list.