-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix submission with "invite to proposal" status stuck in draft if language is not english #4220
Conversation
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.
Excellent progress! This fixes the invite for proposal draft.
It does not seem to fix an initial draft, when e.g. an applicant apply for a lab or content note and begin with saving as draft.
a3532e4
to
def0e76
Compare
It is a oversight from my side, the latest should work. def0e76 |
Test are failing, I'll take a deeper look. |
After carefully reviewing, I realized that the application auto-advances to the next
The current fix, while functional, has an issue where it will always transition to the first available transition at that Phase. I think we can solve this we need to update the workflow spec itself, that enables to deterministically know above two:
@frjo @wes-otf Any preference on the (1) or (2). My take would be to go for an explicit custom marker, even though it's little verbose, for the shake of clarity. |
@theskumar I am not sure about the best approach but what do you think about having a predefined method that can return both types of keys as translated(in same lang) and we can call that method wherever in code we are comparing these keys like here.
|
Thank for the input, initial tried getting the untranslated version of the I'm in a opinion that we should not be doing comparison on the basis of translated strings. Also, since the |
I think option two is best. I agree that we should never compare strings that might be translated. I see no other places but in this Progressing when saving a submission should only happen when submitting a draft and when submitting a "More information is needed". Having something explicit in the workflows for these two statuses would make it more clear what is happening. |
Yes, that's when we check if the "Submit" action is present in the targets and then I'll check other places as well, but it doesn't seem it should have been used. (If we are using translated string for comparisons at other places, that would probably be another ticket for us to go over) For the custom route, I'll need to modify some parts of how the phases and transitions are initialized, but it shouldn't be too complicated. I'll be updating the this PR. PS: Down the road, we must split this workflow file into different module. I see two |
def0e76
to
e6656d6
Compare
Updated the logic to add new marker in the workflow definition indicating this particular phase to pick when the user submits the application and then auto transition to it. |
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.
Works nicely for me.
worked great, really nice work @theskumar! |
The current implementation tries to find the transition based on the
name
property of the transitions available. The name of the transition is a translated string so while submitting a proposal the key "submit" from therequest.POST
could not be found in the available transition.This PR updates the logic to fetch the transition target, by searching through the newly added marker on when to auto transition if the application is submitted.
Fixes #4211
See e6656d6 for patch.
Test Steps
LANGUAGE_CODE
tosv