Skip to content

Conversation

@patanj101
Copy link
Collaborator

No description provided.

Copy link
Owner

@Ches-ctrl Ches-ctrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1st Review

queue: updates
devitjobs_updater:
enabled: <%= Rails.env.production? %> # production only as it interferes with end-to-end testing
devitjobs_updater: # off temporarily as interferes with end-to-end testing
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How so?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why this interferes and revert this in due course

cron: '0 2 * * *' # Runs once per day (at 2 am)
class: Importer::Api::DevitJobsJob
queue: updates
enabled: <%= Rails.env.production? %> # production only as it interferes with end-to-end testing
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly - why?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FormFiller runs as a background job. Can't run if there's three hundred background jobs already in the queue. Also it's just annoying in development to have the database constantly being filled with jobs I didn't seed.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting approach - can we add some comments for how this should work

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This is exactly what I want


RSpec.feature 'ApplyToJob', type: :feature, apply_to_job: true do
before do
skip 'No URL available to test' if ENV['URL_FOR_TESTING'].nil?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we put the url for testing in the ENV file? Seems like an odd place to store this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's temporary memory, not permanent storage. To my knowledge, it's the best way to pass a variable from a rake task to an rspec file.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work?

Copy link
Owner

@Ches-ctrl Ches-ctrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2nd Review

return photo if question.photo?
return cover_letter if question.cover_letter?

resume
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come you've set it up like this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An application form has several attachments now ... and the number will probably grow.
I need to be able to retrieve that specific attachment.
I need the question as a parameter to be able to do so.

# Returns true if no such question is found, indicating the user can apply with Cheddar.
def apply_with_cheddar
return false unless form_structure.dig(:core_questions, :questions)
return false unless form_structure.dig('core_questions', 'questions')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we accessing off strings rather than symbols now? What is the rule we're applying in general?

Copy link
Collaborator Author

@patanj101 patanj101 Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. I think i am loosing sym while saving into the database. It is fix because we are in a sprint.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file doing?

},
{
"attribute": "where_are_you_based_or_where_would_you_be_planning_on_workin",
"attribute": "where-are-you-based-or-where-would-you-be-planning-on-workin",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hyphen rather than underscore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick fix yesterday. I need to correct it.

@patanj101 patanj101 temporarily deployed to cheddar-pipe-2024-08-08-iahgw9 August 9, 2024 08:03 Inactive
@patanj101 patanj101 temporarily deployed to cheddar-pipe-2024-08-08-gwq8o8 August 9, 2024 08:08 Inactive
@patanj101 patanj101 temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 9, 2024 08:14 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 9, 2024 11:05 Inactive
@patanj101 patanj101 temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 9, 2024 11:20 Inactive
@patanj101 patanj101 temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 9, 2024 12:34 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 9, 2024 13:05 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 12, 2024 14:31 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 12, 2024 14:40 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 12, 2024 16:27 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 13, 2024 08:28 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 13, 2024 10:02 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 13, 2024 13:43 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 13, 2024 17:02 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 13, 2024 17:08 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 14, 2024 07:36 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 15, 2024 08:39 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 16, 2024 12:26 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 16, 2024 17:24 Inactive
@Ches-ctrl Ches-ctrl temporarily deployed to cheddar-pipe-2024-08-08-hl4fwk August 17, 2024 02:38 Inactive
def complete_date_fields
puts "Completing datepicker fields..."
all('input[type="date"]').each do |field|
field.set((Date.today + 14).strftime('%d/%m/%Y'))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect date format for HTML5 date input. The code sets the date in '%d/%m/%Y' format, but HTML5 date inputs require 'YYYY-MM-DD' format. This will cause the date to be invalid or not set correctly in the input field.

📚 Relevant Docs

Suggested change
field.set((Date.today + 14).strftime('%d/%m/%Y'))
field.set((Date.today + 14).strftime('%Y-%m-%d'))

React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)

@recurseml
Copy link

recurseml bot commented Aug 4, 2025

😱 Found 1 issue. Time to roll up your sleeves! 😱

Need help? Join our Discord for support!
https://discord.gg/qEjHQk64Z9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants