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

Proposal stuck in draft when language code is set #4211

Closed
notaprodev opened this issue Nov 12, 2024 · 8 comments · Fixed by #4220
Closed

Proposal stuck in draft when language code is set #4211

notaprodev opened this issue Nov 12, 2024 · 8 comments · Fixed by #4220
Assignees
Labels
Type: Bug Bugs! Things that are broken :-/

Comments

@notaprodev
Copy link

notaprodev commented Nov 12, 2024

When LANGUAGE_CODE is set to another language every application gets stuck in draft.

A separate issue is that the menu does not show if the applicant only have draft applications.

To Reproduce

Steps to reproduce the behavior:

  1. Apply for a proposal
  2. Fill the form
  3. Click submit
  4. The proposal stock in draft

Expected behavior

The form should go to review, even though a language is set on env vars
Priority

  • High (keeping you from completing day-to-day tasks)

Affected roles

  • Applicants
@notaprodev notaprodev added the Type: Bug Bugs! Things that are broken :-/ label Nov 12, 2024
@frjo frjo changed the title Proposal stuck in draft when language code was is set Proposal stuck in draft when language code is set Nov 12, 2024
@frjo
Copy link
Contributor

frjo commented Nov 12, 2024

I can confirm this bug. Will get right on figuring out what the issue is. Thanks for reporting it!

@frjo
Copy link
Contributor

frjo commented Nov 12, 2024

I think the error is from this code:

action = set(self.request.POST.keys()) & set(self.transitions.keys())
try:
transition = self.transitions[action.pop()]
except KeyError:
pass
else:
self.object.perform_transition(
transition.target,
self.request.user,
request=self.request,
notify=not (revision or submitting_proposal)
or self.object.status == DRAFT_STATE, # Use the other notification
)

The transition keys are translated but the post keys are not, so no match.

@theskumar Any ideas how to best solve this?

@frjo
Copy link
Contributor

frjo commented Nov 12, 2024

@notaprodev I do not recognise your name. Would love to hear how you are using Hypha!

We have online meetings where Hypha users discuss and share. Please join us at https://we.hypha.app/.

@notaprodev
Copy link
Author

I work for cloud68.co an open source hosting provider, bugs reports are usually created by the support agents. One of our subscribers requested Hypha and after having a call with one of the main devs we deployed Hypha in production.

@frjo
Copy link
Contributor

frjo commented Nov 12, 2024

@notaprodev Thanks for the info! If possible, please let your customer know that we would very mush would like to hear from them, https://we.hypha.app/.

Will also definitely bookmark cloud68.co, we get request from funds that want to use Hypha and hosting is complicated if you do not have your own dev team.

@theskumar
Copy link
Member

theskumar commented Nov 16, 2024

@notaprodev I've created a patch e6656d6 at #4220 please check if that resolves your issue.

@notaprodev
Copy link
Author

Thanks for the patch. We will test it on our testing env and will let you know the result

@frjo frjo closed this as completed in 02398cd Nov 25, 2024
@frjo
Copy link
Contributor

frjo commented Nov 26, 2024

@notaprodev This fix is now released as part of https://github.com/HyphaApp/hypha/releases/tag/v5.19.0

Thanks again for taking the time to report this! It took some time for us to get a fix in place but I believe it is a solid solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bugs! Things that are broken :-/
Projects
None yet
3 participants