Page MenuHomePhabricator

Document methods for obtaining Grant ID for the campaigns registration tool
Closed, ResolvedPublic

Description

Related to T321815

We would like to have a field for grant_id on the event registration tool.
For example, this event https://meta.wikimedia.org/wiki/Event:WikiGap_2023_en_RDC had a few fields that organizers filled out: name, organizers, start/end time, location, event_type (online, in-person, hybrid), group chat link. We would like organizers to also be able to add grant_id. To ensure data quality of the grant_id information we're considering having the field be an auto fill field powered by the Fluxx api.

There are no privacy issues with sharing grant_id. There is also id number, which can also be shared. However, other grant information should not be shared. Note: Fluxx does store private data. See the related Grants Privacy Statement.

Data basics
Fluxx API information

  1. Create an account with Fluxx's support site https://fluxxdev.atlassian.net/servicedesk/customer/user/login and search for 'Fluxx API'.
  2. Although once logged in, you might be able to just go to https://fluxxdev.atlassian.net/servicedesk/customer/portal/1/article/2589491227 The documentation has sections of codes/sample codes that can't be included by saving the page as a pdf (e.g. page 11)

Notes

  • Most events are funded by one grant. Three is a good max number of grants that might be funding any single event.

Details

Other Assignee
cmelo

Event Timeline

Iflorez triaged this task as Medium priority.May 12 2023, 7:40 PM
Iflorez moved this task from Next 2 weeks to Doing on the Product-Analytics (Kanban) board.

Hi @Iflorez, I think we can not make API calls that are out of the wikimedia domain from our extension, I am also not sure if I get it right, but I created my account on fluxxdev, and I looked at the links you shared, but I was not able to find what API would return the list of grand ids.

Logging in to community.fluxx.io I see a special API group, a forum of sorts akin to one of our Slack channels. This may be the best place to post specific questions.
Grant ID is possible to pull using the API. I posted a question on the documentation thread in that channel, asking for documentation references specific to that sort of pull.

@DSaroyan_WMF shares: Hallowelt was our partner to develop a tool which used the Fluxx API to publish grant applications on Meta. see the code.

Fluxx's Dane Robinson says:
It is possible. However, we don't have any documentation on that specific ask. In our documentation, you would need to leverage the Cross Card Filter section to accomplish this.
API Cross Card filters (and API filtering in general) can be difficult, so I made a video on how to create API Cross Card filters (this also applies to regular filtering on most tables).

Chris Andreen from the MacArthur foundation says:

If you want to do relative filtering on dates on the grant_request model, you can use the following syntax:

https://<yourorg>.fluxx.io/api/rest/v2/grant_request?cols=["id"]&filter={"group_type":"and","conditions":[["grant_approved_date","last-n-months","12"]],"relationship_filter_model_type":"GrantRequest"}

Within the filter parameter, you can change that first parameter to whatever date field you want to query.
"grant_approved"date" or any date will work. This example is specific to months, but there are other relative filters as well:

last-n-days
last-n-weeks
last-n-months
last-n-quarters
last-n-years

Chris Andreen from the MacArthur foundation says:

If you want to do relative filtering on dates on the grant_request model, you can use the following syntax:

https://<yourorg>.fluxx.io/api/rest/v2/grant_request?cols=["id"]&filter={"group_type":"and","conditions":[["grant_approved_date","last-n-months","12"]],"relationship_filter_model_type":"GrantRequest"}

Within the filter parameter, you can change that first parameter to whatever date field you want to query.
"grant_approved"date" or any date will work. This example is specific to months, but there are other relative filters as well:

last-n-days
last-n-weeks
last-n-months
last-n-quarters
last-n-years

Thanks @Iflorez, I tried it, I was able to get the list of grant IDs, but the filter is not working, I tried it a lot, and since I was not able to meke the filter parameter to work, I opened a support request on fluxx:
https://fluxxdev.atlassian.net/servicedesk/customer/portal/1/FS-59626?created=true

@ifried I think this task should also be inside the epic T321814, what do you think?