-
Notifications
You must be signed in to change notification settings - Fork 4
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
KAS-4805 implement emptying interal review private comment feature #2266
KAS-4805 implement emptying interal review private comment feature #2266
Conversation
@@ -38,7 +38,7 @@ export default class NewslettersIndexController extends Controller { | |||
const agendas = await meeting.agendas; | |||
return agendas | |||
?.slice() | |||
.sort((a1, a2) => a1.serialNumber.localeCompare(a2.serialNumber)) | |||
.sort((a1, a2) => a1.serialnumber.localeCompare(a2.serialnumber)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is sidetracking, should not be capital N. No errors ever came of this? latestAgenda
could have been incorrect in this view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small remark left. Works well otherwise in happy flow.
// TODO KAS-4886 remove when property is removed from model | ||
if (!isEmpty(agendaitem.privateComment)) { | ||
agendaitem.privateComment = ''; | ||
return await agendaitem.save(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could have some unintended effects on approved agendas that have a next version. Will need to implement an extra check here, or wait until https://kanselarij.atlassian.net/browse/KAS-4886 is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed this by passing reverseSortedAgendas
from args. We can use that to determine the latest agenda without awaiting. Improved check to also only allow the action on the latestAgenda.
…eComment to reduce model saves
In our call to the backend we still passed the privateComment so both internal review and agendaitem model was set. |
…nd-kaleidos into feature/KAS-4805-empty-internal-review
…nd-kaleidos into feature/KAS-4805-empty-internal-review
…nd-kaleidos into feature/KAS-4805-empty-internal-review
Pair reviewed with Tom |
https://kanselarij.atlassian.net/browse/KAS-4805
Noticed that
agendaitem.privateComment
is still being filled in on PROD.So in this code I added it's removal. That does mean saving agendaitems so I copied some the "approveAllAgendaitems" to show a loader and refreshing the route.
This is only needed untill we remove that property from agendaitem model in follow up ticket.
1 side tracking: I discovered that we used
agenda.serial**N**umber
instead of the correctagenda.serialnumber
in some places.Need to check if there are any consequences of that.