Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Add a field program_id to each program. It is a string auto generated with the format: PROG_{SEQ} #88

Open
jeremi opened this issue Jun 22, 2023 · 6 comments · Fixed by #95
Assignees
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@jeremi
Copy link
Member

jeremi commented Jun 22, 2023

Overview

Each program within the OpenSPP system needs to have a unique identification. This will be represented by the program_id field.

  • program_id is a string and should be auto-generated by the system.
  • The format of program_id should be PROG_{SEQ}.
    • PROG_ is a static prefix.
    • {SEQ} is a dynamically generated unique sequence number.
  • The sequence number {SEQ} should increment for each new program.

Program Referencing

  • Each program should be easily identifiable and searchable through its unique program_id. This implies that program_id should be indexed in the database to allow efficient searching and sorting.
  • The program_id should also serve as the XML ID of the record, facilitating easy referencing of the program in XML files and throughout the system.

Constraints

  • program_id should be unique. The system should not allow the creation of two programs with the same program_id.
  • program_id should not be editable by users once the program is created. This is to maintain the integrity of the program_id.

This detailed specification aims to improve the handling and identification of programs within the OpenSPP system. The unique program_id not only ensures the uniqueness of each program but also enhances the search and sorting capabilities, providing a better user experience.

@gonzalesedwin1123
Copy link
Member

@jeremi @dasunhegoda @nhatnm0612 may I propose that this be moved to the openspp-program repo as a customization of the existing spp_programs module.

@nhatnm0612
Copy link
Contributor

@jeremi @dasunhegoda @nhatnm0612 may I propose that this be moved to the openspp-program repo as a customization of the existing spp_programs module.

about this, I think not, it will affect PDS as well, since this field is required on the view, it will raise an error for all the programs that not having it

@dasunhegoda dasunhegoda assigned jeremi and unassigned nhatnm0612 Jul 11, 2023
@adriancris
Copy link

Findings: All test cases below are passed and approved by QA

TSACF-19: Create a Program to verify that Program ID is automatically generated
TSACF-20: Create three or more Programs to verify that Program IDs increment for each new program
TSACF-21: Create Program simultaneously to verify that Program IDs still increment for each new program
TSACF-22: Archive a Program to verify that Program IDs are not reused
TSACF-48: Searching a Program using Program ID
TSACF-49: Sort Programs according to Program ID

All working as expected

@jeremi
Copy link
Member Author

jeremi commented Aug 8, 2023

So this has been implemented already? @adriancris ?

@adriancris
Copy link

hi @jeremi
yes this is already in ACF-DEV

Copy link

github-actions bot commented Mar 3, 2024

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants