Skip to content

add linked projects and tasks variables in itil notification templates#24152

Open
TarekRemo wants to merge 6 commits intoglpi-project:11.0/bugfixesfrom
TarekRemo:ticket_43722
Open

add linked projects and tasks variables in itil notification templates#24152
TarekRemo wants to merge 6 commits intoglpi-project:11.0/bugfixesfrom
TarekRemo:ticket_43722

Conversation

@TarekRemo
Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes ticket 43722.
  • Adds variables for linked projects and tasks in notification templates for ITIL notifications.
  • List of variables added for linked projects :
    • [ItilObject].numberoflinkedprojects
    • linkedproject.id
    • linkedproject.url
    • linkedproject.name
    • linkedproject.content
    • linkedproject.code
    • linkedproject.planstartdate
    • linkedproject.planenddate
    • linkedproject.realstartdate
    • linkedproject.realenddate
  • List of variables added for linked project tasks :
    • ticket.numberoflinkedprojecttasks
    • linkedprojecttask.id
    • linkedprojecttask.url
    • linkedprojecttask.name
    • linkedprojecttask.content
    • linkedprojecttask.planstartdate
    • linkedprojecttask.planenddate
    • linkedprojecttask.realstartdate
    • linkedprojecttask.realenddate

Screenshots (if appropriate):

@TarekRemo TarekRemo requested review from Rom1-B and stonebuzz May 6, 2026 12:29
@TarekRemo TarekRemo self-assigned this May 6, 2026
@TarekRemo TarekRemo added this to the 11.0.8 milestone May 6, 2026
}

// linked project tasks
$data['linkedprojecttasks'] = [];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code has been added to src/NotificationTargetTicket.php.
It will likely also need to be implemented in NotificationTargetChange and NotificationTargetProblem for consistency across notification targets.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't have to add it in NotificationTargetChange and NotificationTargetProblem because we can't link project tasks to changes and problems but only to tickets.

Comment thread CHANGELOG.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants