Skip to content

Created an Individual Positions Detail Page - #660

Open
ACBerea wants to merge 21 commits into
department-portal-basefrom
individual_pos_page_JA
Open

Created an Individual Positions Detail Page#660
ACBerea wants to merge 21 commits into
department-portal-basefrom
individual_pos_page_JA

Conversation

@ACBerea

@ACBerea ACBerea commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Issue Description

Fixes Issue #611

  • Departments should be able to open any position from the Manage Positions page and view its complete position description.
  • This page serves as a view of a position and should display all information associated with the current version of the position.
  • Users should also be able to download the official Work-Learning-Service Position Description directly from this page.
image

Changes

Implemented the following requirements:

  • Create an Individual Position Details page.
  • The page displays the following in a group:
    • Position Title
    • Position Code
    • WLS Level
    • Position Status
    • Last Revision Date
    • Revision Author
  • The page displays the complete position description within a box, including:
    • WLS Level Justification
    • Description of Duties
    • Learning Opportunities
    • Required Qualifications
  • The Download button allows for downloading the position description document.
  • Displays whether the position is:
    • Active
    • Requested
    • Inactive
  • Displays only the current version of the position.
  • Uses a back button to return to the Department Portal

Testing

Getting to the Individual Positions Detail Page

  • Select Department Portal on the sidebar.
  • Select a department.
  • On the Positions Card, select a position (highlighted in blue).
  • The page will reflect the positions information within the dummy data for Positions.

Downloading a Position Description PDF

  • To download a Position Description PDF, click on the Download Description Button.
  • Check your file explorer or download history for the PDF.

Back Button

  • On the Individual Positions Detail Page, click the Back button to return the Department Portal.

Rational for Implementation Decisions

  • The functions created for this only account for the current version of a position and not its history (this should be rectified in the issue Add Position History to Individual Position Page #612.
  • The demo data used does not fully reflect the implementation of the actual position description, as it does not exist as of creating this pull request.
  • The download description button logic should be updated when the accurate position description implementation is used.
  • Since no other type of position status aside from "Active" is currently in use, only "Active" positions are considered.
  • Database implementation cannot be completed until the proper position description data is provided.

@ACBerea
ACBerea changed the base branch from development to department-portal-base July 30, 2026 17:05
positions = positionsList,
posURL = posURL)

@main_bp.route('/department/<org>/<account>/positions/<positionCode>', methods=['GET'])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this whole route should be in departmentportal.py route not in main_route

posURL = posURL)

@main_bp.route('/department/<org>/<account>/positions/<positionCode>', methods=['GET'])
def individualPosition(org, account, positionCode):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

instead of individualPosition it should be positionDescription as we are basically displaying the content of PDF

position=position
)

@main_bp.route('/department/<org>/<account>/positions/<positionCode>/download', methods=['GET'])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

in departmentPortal.py route

except (NameError, DoesNotExist):
return render_template('errors/404.html'), 404

position = PositionHistory.get_or_none(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

turn this into one line and the positionHisotry.status="active" shouldn't be there as the issue description says: Display whether the position is:
-Active
-Requested
-Inactive

Notes:
This page displays only the current version. meaning we will display either active or requested or inactive but we will only show the current one meaning the most recent one. so your filter here should be the most recent instead of active filter. this mean if the most recent one is a requested status that should be shown.

Comment thread app/logic/download.py Outdated

return None

def makePositionDescriptionPDF(department, position, revisionAuthor):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

revisionAuthor is an extra parameter that is not use that mean you should also remove it from the function called in main routes: makePositionDescriptionPDF(dept, position, position.revisedBy) so remove the positions.revisedBY as the parameter revisionauthor is never used.

Comment thread app/logic/download.py
('Position Code', position.positionCode),
('WLS Level', position.wls),
('Status', position.status),
('Last Revision Date', position.revisionDate),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

create a test for the makepositionsdescriptionPDF you can find there are modules that read pdf and traverse and you can assert those.

ACBerea and others added 8 commits July 30, 2026 14:46
…escription and downloadPositionDescription out of main_routes.py and into departmentPortal.py.
…nd accounts for revision dates. Added checks for revision dates to account for positions that have status' other than active in departmentPortal.py. Modified parameters in downloads.py.
… the new getPositionRevision function in the test_getPosition.py.
…instances accordingly. Began work on a test function for download,py
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.

3 participants