Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: send rabbitMQ messages when proposals move between faps #778

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

ACLay
Copy link
Contributor

@ACLay ACLay commented Sep 18, 2024

Description

We have downstream software that manages a sharepoint datasource that needs informing when a proposal has been moved between access panels. The UOP event triggered by this wasn't being sent to rabbitMQ, so this PR adds it to the list of events that are.

Motivation and Context

How Has This Been Tested

By writing the update for the downstream software that will consume the events and updating test proposals in my local environment. (https://github.com/isisbusapps/proposal-allocations/pull/577)

Fixes

Fixes UserOfficeProject/issue-tracker#1174

Changes

Depends on

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@ACLay ACLay requested a review from a team as a code owner September 18, 2024 15:20
@ACLay ACLay requested review from TCMeldrum and removed request for a team September 18, 2024 15:20
@ACLay ACLay requested review from a team and martin-trajanovski and removed request for a team September 18, 2024 17:09
@janosbabik janosbabik requested review from janosbabik and removed request for martin-trajanovski September 19, 2024 08:11
@martin-trajanovski
Copy link
Contributor

martin-trajanovski commented Sep 19, 2024

@ACLay I was thinking if this is the right way of hardcoding the email sending or using the workflow to do it is much better. For example on status change to "PROPOSAL_FAPS_SELECTED" (It might be sometimes that the right status is not part of the system already but we can always add new statuses I guess and use them in the workflow) we can trigger email sending to configured people or message to RabbitMQ consumers as well. Let me know what do you think about this.

@ACLay
Copy link
Contributor Author

ACLay commented Sep 19, 2024

We don't have PROPOSAL_FAPS_SELECTED causing any status transitions in our workflows.

The case I'm trying to capture with this is that a user officer can manually move a proposal between FAPs, as some instruments can be reviewed in one of many FAPs. That moving can be done at any point in the workflow up to the reviews taking place, and doesn't affect their status, so I don't see how we could capture it practically in a workflow.

@martin-trajanovski
Copy link
Contributor

We don't have PROPOSAL_FAPS_SELECTED causing any status transitions in our workflows.

The case I'm trying to capture with this is that a user officer can manually move a proposal between FAPs, as some instruments can be reviewed in one of many FAPs. That moving can be done at any point in the workflow up to the reviews taking place, and doesn't affect their status, so I don't see how we could capture it practically in a workflow.

Yes you are right then it is a bit hard to catch that as we don't have event based actions but only status. Maybe in the future it will be good to think about that and automate this by adding some event actions that will be executed if some event is triggered. But it is not that relevant for today as we already have some hardcoded events triggering some action.

@ACLay ACLay enabled auto-merge September 19, 2024 10:51
@ACLay ACLay merged commit 0b233f3 into develop Sep 19, 2024
19 checks passed
@ACLay ACLay deleted the 1174-fap-updates-via-rabbitmq branch September 19, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As a downstream software developer, I want a RabbitMQ message to be sent when a proposal changes FAP
4 participants