-
-
Notifications
You must be signed in to change notification settings - Fork 45
Pm-fixed bug for job status button click and landing page for connect #3064
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
Conversation
📝 WalkthroughWalkthroughThe changes update several areas of the codebase related to handling Connect opportunity status and working hours formatting. In Sequence Diagram(s)sequenceDiagram
participant User
participant HomeScreenBaseActivity
participant CallingActivity
User->>HomeScreenBaseActivity: Presses Opportunity Status
HomeScreenBaseActivity->>CallingActivity: setResult(RESULT_OK, intent with REDIRECT_TO_CONNECT_OPPORTUNITY_INFO)
HomeScreenBaseActivity->>HomeScreenBaseActivity: finish()
sequenceDiagram
participant ConnectIdActivity
participant PreviousActivity
PreviousActivity->>ConnectIdActivity: startActivityForResult(CONNECT_JOB_INFO)
ConnectIdActivity->>PreviousActivity: onActivityResult(requestCode=CONNECT_JOB_INFO, data)
alt requestCode == CONNECT_JOB_INFO
ConnectIdActivity->>ConnectIdActivity: handleRedirection(data)
end
Possibly related PRs
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
app/src/org/commcare/activities/HomeScreenBaseActivity.java(1 hunks)app/src/org/commcare/activities/connect/ConnectIdActivity.java(1 hunks)app/src/org/commcare/android/database/connect/models/ConnectJobRecord.java(2 hunks)app/src/org/commcare/connect/ConnectConstants.java(0 hunks)
💤 Files with no reviewable changes (1)
- app/src/org/commcare/connect/ConnectConstants.java
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/src/org/commcare/activities/connect/ConnectIdActivity.java (1)
app/src/org/commcare/connect/ConnectConstants.java (1)
ConnectConstants(8-83)
🔇 Additional comments (2)
app/src/org/commcare/activities/connect/ConnectIdActivity.java (1)
49-49: Code refactoring to use a different request code constantThe code now checks for
CONNECT_JOB_INFOinstead of the removedCONNECTID_REQUEST_CODEconstant, which aligns with changes in ConnectConstants.java. This ensures consistent request code handling across the Connect functionality.app/src/org/commcare/android/database/connect/models/ConnectJobRecord.java (1)
464-476: Improved time zone handling for displaying working hoursThe implementation now consistently handles time zone conversion, ensuring working hours are always displayed in the user's local time rather than UTC. This improves the user experience by showing correct working hours in the Connect job screens.
Key improvements:
- Explicitly sets input timezone to UTC for parsing
- Correctly converts to the local timezone for display
- Uses a consistent SimpleDateFormat approach
| Intent i = new Intent(); | ||
| i.putExtra(REDIRECT_TO_CONNECT_OPPORTUNITY_INFO, true); | ||
| setResult(RESULT_OK); | ||
| setResult(RESULT_OK, i); |
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.
Bug fix: Now correctly passing intent data with result
This change fixes a critical issue where the intent containing the REDIRECT_TO_CONNECT_OPPORTUNITY_INFO flag wasn't being passed to the calling activity, causing the job status button click functionality to fail.
🤖 Prompt for AI Agents (early access)
In app/src/org/commcare/activities/HomeScreenBaseActivity.java around lines 582 to 584, the intent with the REDIRECT_TO_CONNECT_OPPORTUNITY_INFO flag was not properly passed back to the calling activity. Fix this by creating a new Intent, adding the flag as an extra, and then passing this intent to setResult with RESULT_OK to ensure the calling activity receives the data correctly.
|
@damagatchi retest this please |
1 similar comment
|
@damagatchi retest this please |
Product Description
https://dimagi.atlassian.net/browse/QA-7705
bug fix for connect landing page
https://dimagi.atlassian.net/browse/CCCT-988
cross-request: dimagi/commcare-core#1455
Technical Summary
Feature Flag
Safety Assurance
Safety story
In this the impact will be time shown as working hours on the connect job screens
we have to show the time n local time zone
I have manually checked the times it showing correct on all job screen
Automated test coverage
QA Plan
Labels and Review