Page MenuHomePhabricator

Allow users to withdraw an application
Closed, ResolvedPublic



If a user wishes to withdraw their application for a resource, for example because they applied by mistake or filed a duplicate application, there should be some mechanism for them to do so without requiring intervention from coordinators. There is currently no way for them to do so.

We should add a new button to the My Applications page ( next to any Pending or Under Discussion applications with the text "Withdraw". The button should change that application's status to Invalid and provide the user with a message which says "Your application to {partner} has been withdrawn."

Good first task

This task has been placed in the good first task category. This means it has been scoped and written in a way that makes it simpler for folks who haven’t contributed to the tool’s development or open source software in the past.

If that’s you, welcome! Please feel free to ask questions here about this specific task or the codebase more generally. We’ll be more than happy to help you and clarify the steps needed to complete the task, whether that’s setting up the repository, implementing the necessary changes, or pushing your changes to Github.

If you have experience contributing to this project or similar ones, please consider leaving this one for someone new, and taking a look at the Open Tasks column of the workboard for another task. Also feel free to help out if you see unanswered questions here!

How to contribute

Assign yourself to this task: Click the ‘Add Action’ dropdown menu below and then select Assign / Claim. The box should fill your username in automatically, then click Submit!

To submit your changes, you should fork the repository and create a new branch. After pushing your changes to your Github branch, you can open a pull request. Please link your pull request in a comment here when it has been submitted, and include the Phabricator task number in the pull request. Experienced contributors to the project will review your code and either provide feedback or merge it in!

Event Timeline

Samwalton9-WMF renamed this task from Withdraw applications to Allow users to withdraw an application.May 20 2020, 11:27 AM
Samwalton9-WMF triaged this task as Low priority.
Samwalton9-WMF moved this task from Incoming tasks to Open tasks on the Library-Card-Platform board.
Lutrome subscribed.

Taking this task, along with T242196.

Hey @Lutrome - any luck making progress on this? Anything you need help with?

Unassigning this due to lack of response. Feel free to reassign if you plan to work on this task :)

Saloniig subscribed.

{F32250266}Hi I want to contribute to this project but I am facing problem. I have installed the project on localhost and I am not able to login as when I click on login button it shows "You tried to log in but presented an invalid access token". Kindly help me.

This looks like a clock drift or latency issue between the local twlight oauth service provider and the remote wikimedia oauth identity provider.

Try this change:

-            identity = handshaker.identify(access_token, 15)
+            identity = handshaker.identify(access_token, 600)

In TWLight/TWLight/users/

Don't commit this change, but let us know if it resolves the issue for you.

Thank you! now the project is working fine and I am working on the task now and I will report to you here about the progress :)

Thanks for letting us know, I've filed a separate task (T262395) for configuring this value correctly for local development.

@Saloniig How are you progressing with this task? :)

Hi @Samwalton9 ! I'd like to take up the task if it's not being done by @Saloniig right now.

Please feel free :)

Yash4357 subscribed.

Hi @Samwalton9! I'd like to work on this task

Hi @Samwalton9,
I have one doubt in this question that,
when user will click on the withdraw button, then the application which was there should be deleted from the my application page or not.

If yes then do I need to delete that application from the database??

If the application should be deleted then there is no need to change the status of the application.

Good question!

I think you're right that deletion would be a preferable way of handling this. So yes, instead of changing the application status, simply deleting the application object makes sense to me.

Do I need to delete that application from the database???

This comment was removed by Yash4357.

Hey Sam,
Can you tell me how I can use Print() in terminal ??
Because I want to do some debugging..

Hi Sam,


I want to redierect my withdraw button to above url after deletion how I can do these.
I had tried

return redirect ** permanent = True

url  = reverse_lazy("users:my_applications")**

but it did not work because my_applications also have primary key.
Can you help me out..

Can you tell me how I can use Print() in terminal ??

The easiest way to print out for debugging is to use the logger. You can do so with:

import logging
logger = logging.getLogger(__name__)

(If this isn't already set up in the file you're in)

Then print debug messages to the Docker log with:"Your debug string here")

but it did not work because my_applications also have primary key.

To add the primary key in here you can do something like:

url  = reverse_lazy("users:my_applications", kwargs={"pk":})

Can I use function base view instead of class base view.

We're using class based views wherever possible in this project. Can I help with that at all?

Hi Sam,
I had solve this issue and created a pull request.
Please! have a look and suggest if any more changes or improvements needed...