Skip to content

Feature: Cybersikkerhedsrapport#264

Merged
jeppekroghitk merged 31 commits into
developfrom
feature/6262-cybersikkerheds-rapport
May 26, 2026
Merged

Feature: Cybersikkerhedsrapport#264
jeppekroghitk merged 31 commits into
developfrom
feature/6262-cybersikkerheds-rapport

Conversation

@jeppekroghitk

@jeppekroghitk jeppekroghitk commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Link to ticket

#6262

Description

Adds a report that shows hours logged on all worklogs for all tickets with the version "Cybersikkerhedsaftale" in all projects for a given time period, and renders them in a table.

Screenshot of the result

Screenshot 2026-01-22 at 10 34 41

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

@tuj tuj assigned tuj and unassigned tuj Jan 21, 2026
@jeppekroghitk jeppekroghitk force-pushed the feature/6262-cybersikkerheds-rapport branch from 3e81585 to c4aa6f8 Compare May 19, 2026 07:01
@jeppekroghitk jeppekroghitk requested a review from tuj May 19, 2026 09:03

$requestData = $request->query->all('cybersecurity_report');

$dataProviderId = ($requestData['dataProvider'] ?? null) ?: $this->defaultDataProvider;

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.

Should we ignore the dataProvider stuff and just get from all data providers?

Comment thread src/Form/CybersecurityReportType.php Outdated
*/
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$dataProviders = $this->dataProviderRepository->findAll();

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.

Can we write data provider out of this, so it just applies to all data providers?

@jeppekroghitk jeppekroghitk force-pushed the feature/6262-cybersikkerheds-rapport branch from a2e98ff to 82e8d43 Compare May 20, 2026 07:34
@jeppekroghitk jeppekroghitk force-pushed the feature/6262-cybersikkerheds-rapport branch from f2dcd66 to 9100ad4 Compare May 21, 2026 06:33
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('versionTitle', ChoiceType::class, [

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.

Why this choice, when there is only one option?

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.

To trivialize the addition of more versions in the future. AFAIR it was requested, so i chose to implement it like this.

Comment thread src/Repository/WorklogRepository.php Outdated
public function getWorklogsByIssueAndPeriod(int $issueId, ?\DateTimeInterface $fromDate, ?\DateTimeInterface $toDate): array
{
$qb = $this->createQueryBuilder('w')
->andWhere('w.issue = :issue') // <-- use the entity relation

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.

remove comment

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.

It's gone!

Comment thread src/Repository/WorklogRepository.php Outdated
{
$qb = $this->createQueryBuilder('w')
->andWhere('w.issue = :issue') // <-- use the entity relation
->setParameter('issue', $issueId); // Doctrine can accept the ID for a ManyToOne

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.

remove comment

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.

It's gone!

Comment thread baseline.xml Outdated
@@ -0,0 +1,490 @@
<?xml version="1.0" encoding="UTF-8"?>

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.

Baseline has been removed from develop since the shift from psalm to phpstan. Remove this file.

@jeppekroghitk jeppekroghitk requested a review from tuj May 22, 2026 10:30
@jeppekroghitk jeppekroghitk merged commit 1e8fece into develop May 26, 2026
9 checks passed
@jeppekroghitk jeppekroghitk deleted the feature/6262-cybersikkerheds-rapport branch May 26, 2026 13:20
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.

2 participants