Skip to content

Tan 8492 pending review approved when project is published - #14648

Open
Stef-Rousset wants to merge 11 commits into
masterfrom
TAN-8492-pending-review-approved-when-project-is-published
Open

Tan 8492 pending review approved when project is published#14648
Stef-Rousset wants to merge 11 commits into
masterfrom
TAN-8492-pending-review-approved-when-project-is-published

Conversation

@Stef-Rousset

@Stef-Rousset Stef-Rousset commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🎩 What? Why?
When the admin directly published the project, the project_manager still sees 'waiting approval' in the back office of the project, even though the project has already been published.
Now the pending review if ti exists is approved in this case.
Published button is also displayed for the project manager when an admin publishes a project for which no review was ever requested.

This PR also contains a new method in project_review model, approvable_by?, to refactor the code.

Tasks

  • add rake task to remove pending reviews for published projects
  • add tests

Changelog

Fixed

  • approve pending review if admin directly publishes the project
  • display published button for project manager when admin publishes a project for which no review was ever requested

@notion-workspace

Copy link
Copy Markdown

@cl-dev-bot

cl-dev-bot commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator
Warnings
⚠️ The PR title contains no Jira issue key (case-sensitive)
Messages
📖 Changelog provided 🎉
📖 Notion issue: TAN-8492
📖

Run the e2e tests

📖 Check translation progress

Generated by 🚫 dangerJS against 83fc237

@Stef-Rousset
Stef-Rousset marked this pull request as ready for review August 24, 2026 09:44
@Stef-Rousset
Stef-Rousset requested review from jinjagit and removed request for AchrafGoVocal August 24, 2026 14:44
Comment thread back/spec/services/side_fx_project_service_spec.rb Outdated
Comment thread back/spec/services/side_fx_project_service_spec.rb Outdated
Comment thread back/spec/services/side_fx_project_service_spec.rb

@jinjagit jinjagit left a comment

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.

LGTM.

I have raised a question , however, about the remaining mechanism that can maybe produce more of such 'published and awaiting review' projects, even after you run the rake task to clean them up.

@Stef-Rousset
Stef-Rousset requested a review from jinjagit August 26, 2026 06:53
Comment thread back/app/services/side_fx_project_service.rb Outdated
Comment thread back/app/services/side_fx_project_service.rb Outdated
Comment thread back/spec/services/side_fx_project_service_spec.rb Outdated

@jinjagit jinjagit left a comment

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.

Sorry, but I found 3 more things on my second review that I missed on my first.

@Stef-Rousset
Stef-Rousset force-pushed the TAN-8492-pending-review-approved-when-project-is-published branch from 39c1af8 to 83fc237 Compare August 28, 2026 15:00
@Stef-Rousset

Copy link
Copy Markdown
Contributor Author

Sorry, but I found 3 more things on my second review that I missed on my first.

Hello @jinjagit , no pb, thx for your check ! I made the necessary changes 😉

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