Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 979
    • Issues 979
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • Core
  • Issues
  • #1706

Closed
Open
Opened Apr 15, 2020 by eileen@eileen🎱Owner

APIv4 MessageTemplates & workflow_ids

My expectation is that using one of the apis I could do something like

MessageTemplate::get()->addSelect('workflow_id', '=', 'participant_confirm');

And it would retrieve it (avoiding any nasty joins per #1705) - However, I'm 'up against' the fact the workflow_ids were done in a really weird way.

The 'normal' design would be one option group for message templates & then we would have options against that for each defined workflow_template, with a component id as a filter & the value being meaningful.

Instead MessageTemplates break the option_group structure by using id as the value and using different option groups to separate by components.

I guess options are

  1. fix it - update all values to be equal to the ids in an upgrade script, define a normal pseudoconstant in the xml & switch code accross
  2. add a pseudoconstant that defines the join as it actually is This kinda says 'never gonna fix you up, never gonna let you down, never gonna turn around & standardise you'
  3. Add the correct values for the component ids to the option_values, add a new function for pseudoconstant callback that handles it - still aspire to fix properly one day.

It does depend a bit on #1705 and how much the api will or won't mask the underlying structure

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1706