Skip to content

Releases: sjacorg/bayanat

bayanat v1.34

09 Apr 22:59
Compare
Choose a tag to compare
  • Actor Profiles: Complete overhaul of the Actor component and addition of Profiles to help analysts store information from multiple sources in one Actor, cutting down on duplication within the database and improving efficiency, while allowing for information from different sources to remain clearly separated.
    • Move origin ID, description, labels, sources, source links, documentation date and publish date, as well as all missing persons fields, to a new component called Actor Profile.
    • Profile can have one of three types:
      • Normal.
      • Missing Person: This type will contain fields from the normal profile in addition to missing persons fields.
      • Main: Same fields as in normal profile. However, each Actor can have one main profile and this profile can be used to consolidate and verify information stored in all profiles.
    • Every Actor can contain unlimited number of normal and MP Profiles and one main profile.
    • Profiles can be deleted and duplicated to allow for speedy creation.
    • Changes to the Actor component to make the fields more universal, improve input uniformity and efficiency:
      • Change family status to dropdown list.
      • Change dialect to dropdown list. Dialects can be created and managed in the Component Data dashboard.
      • Split father and middle name to two separate fields.
      • Remove date of birth, place of birth and place of residence and move existing data to events.
      • Remove the need to re-enter full name of a person, will be generated from first, middle and last name.
      • Move "number of children" from missing persons to Actor.
      • Add shortcuts to auto fill first and last names for persons with unknown names.
  • Activity monitor: Improving this tool to allow admins to create audit trail of all users actions in the database.
    • Complete revamp of the UI.
    • Add a search tool, allowing admins to filter actions by date, type, subject and/or user.
    • Track more user actions.
    • Add settings for Activity Monitor in the System Settings dashboard to allow admins to customize their instances:
      • Setting for retention period (minimum is 90 days), after which activities will be automatically deleted.
      • Settings to enable/disable logging of types of user actions.
  • Sheets import:
    • Changes in code to support sheets import after changes in Actor/Actor Profiles.
    • More refactoring and improvements to code quality.
    • Fix a bug in skin markings import.
  • Remove unneeded languages setting from System Settings dashboard.
  • Re-enable OAuth, disabling sign-up and allowing sign-ins from users already created by an admin only.
  • Fix a bug that caused related items to appear multiple times in review dialogs.
  • Fix a bug in user management dashboard that prevented opening of the navigation drawer.
  • Fix a bug in upload to S3 bucket which prevented uploads.
  • Fix bug in global default language setting.
  • Upgrade requirements
  • Tweak tests to accommodate the above changes.
  • Change to automated tests in GitHub Action to build the Bayanat container instead of using pre-built images.
  • New management command to check the local database alignment with the database models in the code.

Please ensure the Bayanat database, config.js and the .env files are backed up before beginning this upgrade.

After stopping all Bayanat services, carefully follow the following steps to upgrade to this version:

  1. Upgrade deps:

    source env/bin/activate
    pip install -r requirements.txt
    
  2. Database migrations:

    1. Migrate family status and dialects first:

      BEGIN;
      
      -- Step 1: Update the description column
      UPDATE actor       
      SET description = COALESCE(description, '') ||
                      '<br> <br> Family status: ' || COALESCE(family_status, '') where family_status != '';
      
      UPDATE actor       
      SET description = COALESCE(description, '') ||
                      '<br> <br> Family status (AR): ' || COALESCE(family_status_ar, '') where family_status_ar != '';
      
      UPDATE actor       
      SET description = COALESCE(description, '') ||
                      '<br> <br> Dialects: ' || COALESCE(dialects, '') where dialects != '';
      
      UPDATE actor       
      SET description = COALESCE(description, '') ||
                      '<br> <br> Dialects (AR): ' || COALESCE(dialects_ar, '') where dialects_ar != '';
      
      -- Step 2: Drop the family_status and dialects columns if the update was successful
      ALTER TABLE actor
      DROP COLUMN family_status,
      DROP COLUMN family_status_ar,
      DROP COLUMN dialects,
      DROP COLUMN dialects_ar;
      
      ALTER TABLE actor ADD COLUMN IF NOT EXISTS family_status VARCHAR(255); 
      
      COMMIT;
      
      BEGIN;
      
      CREATE TABLE dialects (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          title_tr VARCHAR,
          created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT (NOW() AT TIME ZONE 'UTC'),
          updated_at TIMESTAMP WITHOUT TIME ZONE DEFAULT (NOW() AT TIME ZONE 'UTC'),
          deleted BOOLEAN
      );
      
      CREATE TABLE actor_dialects (
          actor_id INTEGER,
          dialect_id INTEGER,
          PRIMARY KEY (actor_id, dialect_id),
          FOREIGN KEY (actor_id) REFERENCES actor(id),
          FOREIGN KEY (dialect_id) REFERENCES dialects(id)
      );
      
      COMMIT;
      
    2. Migrate father name. This will depend on the previous use of the Father/Middle Name column. Please choose one of the two following option:

      a. If the column was used to store middle name information, create a new column for Father's Name:

       BEGIN;
      
       -- Add father name as new columns
       ALTER TABLE actor ADD COLUMN IF NOT EXISTS father_name VARCHAR(255);
       ALTER TABLE actor ADD COLUMN IF NOT EXISTS father_name_ar VARCHAR(255);
      
       COMMIT;
      

      b. If the column was used to store father's name information, rename existing column and create a new one for Middle Name:

       BEGIN;
       -- ALTERNATIVE SCENARIO FOR DBS THAT USED THE COLUMN AS FATHER NAME
       ALTER TABLE actor RENAME COLUMN middle_name to father_name;
       ALTER TABLE actor RENAME COLUMN middle_name_ar to father_name_ar;
       ALTER TABLE actor ADD COLUMN IF NOT EXISTS middle_name VARCHAR(255);
       ALTER TABLE actor ADD COLUMN IF NOT EXISTS middle_name_ar VARCHAR(255);
       COMMIT;
      
    3. Update the following columns:

       -- Rename columns
       -- Note: These statements will fail if the columns do not exist.
       ALTER TABLE actor RENAME COLUMN actor_type TO type;
       ALTER TABLE actor RENAME COLUMN bio_children TO no_children;
       ALTER TABLE actor RENAME COLUMN national_id_card TO id_number;
      
    4. Move data from Actor to Actor Profile. This will create a new Profile, link it to Actor, move the data from Actor to Profile, and delete columns in Actor:

      BEGIN;
      
      CREATE TABLE actor_profile (
          id SERIAL PRIMARY KEY,
          description TEXT,
          source_link VARCHAR(255),
          source_link_type BOOLEAN DEFAULT FALSE,
          publish_date TIMESTAMP,
          documentation_date TIMESTAMP,
          actor_id INTEGER REFERENCES actor(id),
          originid VARCHAR(255),
      
          mode INTEGER DEFAULT 1 NOT NULL,
      
          -- Fields from BaseMixin
          created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
          updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
          deleted BOOLEAN
      
      );
      
      
      INSERT INTO actor_profile (id, description, source_link, source_link_type, publish_date, documentation_date, actor_id, originid)
      SELECT id, description, source_link, source_link_type, publish_date, documentation_date, id, originid FROM actor;
      
      
      -- reset actor profile counter
      SELECT setval('actor_profile_id_seq', (SELECT MAX(id) FROM actor_profile));
      
      -- Rename actor_id to actor_profile_id in actor_sources table
      ALTER TABLE actor_sources RENAME COLUMN actor_id TO actor_profile_id;
      
      -- Rename actor_id to actor_profile_id in actor_labels table
      ALTER TABLE actor_labels RENAME COLUMN actor_id TO actor_profile_id;
      
      -- Rename actor_id to actor_profile_id in actor_verlabels table
      ALTER TABLE actor_verlabels RENAME COLUMN actor_id TO actor_profile_id;
      
      -- migrate foreign key constraints
      
      -- actor_labels table
      ALTER TABLE actor_labels DROP CONSTRAINT IF EXISTS actor_labels_actor_id_fkey;
      ALTER TABLE actor_labels ADD CONSTRAINT actor_labels_actor_profile_id_fkey FOREIGN KEY (actor_profile_id) REFERENCES actor_profile(id);
      
      -- actor_sources table
      ALTER TABLE actor_sources DROP CONSTRAINT IF EXISTS actor_sources_actor_id_fkey;
      ALTER TABLE actor_sources ADD CONSTRAINT actor_sources_actor_profile_id_fkey FOREIGN KEY (actor_profile_id) REFERENCES actor_profile(id);
      
      -- actor_verlabels table
      ALTER TABLE actor_verlabels DROP CONSTRAINT IF EXISTS actor_verlabels_actor_id_fkey;
      ALTER TABLE actor_verlabels ADD CONSTRAINT actor_verlabels_actor_profile_id_fkey FOREIGN KEY (actor_profile_id) REFERENCES actor_profile(id);
      
      
      
      -- handle updated generated column (Search)
      
      -- drop old column
      ALTER TABLE actor DROP COLUMN IF EXISTS search;
      
      -- Add the new 'search' column as a computed column based on new structure
      ALTER TABLE actor ADD COLUMN search TEXT GENERATED ALWAYS AS (
          (id)::text || ' ' ||
          COALESCE(name...
      
Read more

bayanat v1.31

29 Feb 13:23
Compare
Choose a tag to compare
  • Visualizing queries: graph visualizations can now be used to visualize results of queries instead of being restricted to one item at a time. Users will see a button
  • Introducing tests. Check Contributing Guidelines for further information. Tests currently cover backend routes, we'll be add more in the next few months.
  • Introducing restrictive access control mode: If activated by admin, all items will be restricted in the database by default. Users will be only able to access items they're explicitly given access to.
  • Added default export expiry time setting to system settings.
  • Added additional security to upload endpoints.
  • Improvements to Docker compose, adding dev and test compose and using pre-built images to accelerate GitHub checks. Additionally, new improvements allow Bayanat to restart when new system settings are saved.
  • Further improvements to localization and adding translations for Russian, Spanish and Farsi languages.
  • Improvements to preview cards.
  • Improvements to image viewer.
  • Improvements to map popup.
  • Improvements and small fixes in System Settings dashboard.
  • Improving gen-env.sh script that help generate .env files.
  • Fixed a bug in allowed media types, unified validations of extensions.
  • Fixed a bug in export approval.
  • Fixed a bug in GeoLocation types.
  • Fixed multiple bugs in User Administration dashboard.
  • Fixed a bug in peer review when the user attempted to add a ref to an item with none.
  • Fixed a bug in description inline images preview.
  • Fixed a bug in media player when the user attempted to play the video again after returning to the item.
  • Fixed a bug in Actor date search fields.
  • Fixed a bug in visualization when B2B relation type isn't specified.
  • Remove tesseract bin setting from System Settings dashboard, moving back to .env
  • Update .env-sample file.
  • Upgraded requirements.

The visualizations improvements included in this version were made possible by funding from the International Coalition of Sites of Conscience.

Please ensure the Bayanat database, config.js and the .env files are backed up before beginning this upgrade.

After stopping all Bayanat services, carefully follow the following steps to upgrade to this version:

  1. Upgrade deps:

    source env/bin/activate
    pip install -r requirements.txt
    
  2. Database migrations:

    No database migrations required to upgrade to this version.

  3. Restart services.

bayanat 1.29.1

23 Dec 05:45
Compare
Choose a tag to compare

This version doesn't contain any changes to Bayanat. It only introduce formatting guidelines for Python and JS files, as well as formatting these files.

No upgrade steps are required for this version.

bayanat 1.29

03 Dec 02:59
Compare
Choose a tag to compare
  • Security Policies: this version allows administrators to set security policies for their Bayanat installations.
    • Using DropBox's zxcvbn to calculate password strength and enforcing a minimum strength for all users.
    • Allowing administrators to set minimum password length for all users.
    • Allowing administrators to enforce two factor authentication on all users.
    • Allowing administrators to force users to reset their passwords individually or globally.
  • Implementing Webauthn specification for second factor authentication, enabling users to register supported authenticators such as a security key, biometrics (fingerprint, facial recognition), and much more. You can check this link read more about the Webauthn and supported authenticators.
  • Import improvements:
    • New log dashboard to display all import requests queued using Media and Sheets Import tools. This dashboard allows admins to track progress of their imports as well as check for any errors.
    • Major improvements to the code of both Media and Sheets Import tool.
  • Replace image viewer and allow it in Actors and preview popups.
  • Generate default Workflow Status on database creation.
  • Improvement to Export progress tracking.
  • Fix a bug in geo-spatial search radius slider.
  • Fix a bug in Geo Marker map popup.
  • Fix a bug in Sheets Import tool that affected Nationality and Ethnographic Information columns import.
  • Fix a bug that temporarily prevented access to newly uploaded media to S3.
  • Fix a bug that prevented removal of all roles from a user.
  • Fix a bug in CSV import that didn't reset database ID sequence numbers after import.
  • Fix a bug in CSV import of Bulletin to Bulletin relationships.
  • Fix a bug that prevented export button to appear in Actor and Incident pages.
  • Fix a bug in Location parent search in Location creation and edit.

The import improvements in this version were made possible by funding from the International Coalition of Sites of Conscience.

Please ensure the Bayanat database, config.js and the .env files are backed up before beginning this upgrade.

After stopping all Bayanat services, carefully follow the following steps to upgrade to this version:

  1. Upgrade deps:

    source env/bin/activate
    pip install -r requirements.txt
    

    Afterwards, use database create command to create the new Data Import and WebAuthn tables:

    flask create-db
    
  2. Database migrations:

    1. User table migrations:

      ALTER TABLE "user"
      ADD COLUMN fs_webauthn_user_handle VARCHAR(64) UNIQUE;
      
    2. Optionally, drop the obsolete Log table, which is replaced with Data Import:

      DROP TABLE log;
      
  3. Restart services.

Note: The original release notes for the previous version contained an error in the migration of the app_config table. If you have an issue with your instance, please carry out the following migration:

ALTER TABLE app_config 
ADD COLUMN created_at TIMESTAMP DEFAULT current_timestamp,
ADD COLUMN updated_at TIMESTAMP DEFAULT current_timestamp,
ADD COLUMN deleted BOOLEAN,
ADD COLUMN user_id INTEGER, 
ADD CONSTRAINT app_config_user_id_fkey FOREIGN KEY (user_id) REFERENCES "user" (id);

You don't need to run the previous command unless you've updated to the previous version before us publishing this correction on 10/1/2024.

bayanat v1.26

10 Nov 04:17
Compare
Choose a tag to compare
  • Bayanat System Administration:
    • Completely move the system administration from the .env file to a UI dashboard in the Bayanat app.
    • System Settings dashboard will allow administrator to manage their Bayanat servers without the need to go back to the backend.
    • Move system configuration from config.js file to the front-end. Some configuration are now available in the System Settings dashboard, while others have been moved to the new Component Data dashboard.
    • Component Data dashboard will enable admins to adapt their system effortlessly to any context or country.
    • Lists of nationalities, ethnographic information, relationships types, media categories and geo-location types are all now customizable through this dashboard, with an option to load the default data.
    • Re-authentication will be required to access these dashboards after a grace period.
    • System-wide refractoring to accommodate this feature.
    • Add a new CLI command to import default data during installation.
  • Spatial Search: this feature allows users to search Actors, Bulletins and Locations by dropping a pin in a map and specifying a radius for the circle.
  • Full advanced search tool in Locations dashboard. This allows users to search all columns in Locations.
  • Event map visualization: timeline visualization linking events in Actors, Bulletins and Incidents in chronological order.
  • Refactoring search fields.
  • Fix for a bug that affected date of birth and location columns in Actors.
  • Fix for a bug that affected relationship mirroring in Actor to Actor relationships.
  • Fix for a bug that affected location serialization.
  • Improving translations.
  • Upgrade dependencies.

This version contains major rewrite of significant parts of the Bayanat code. Upgrading to this version must be done with care. Please ensure the Bayanat database and the .env file are backed up before beginning this upgrade.

After stopping all Bayanat services, carefully follow the following steps to upgrade to this version:

  1. Upgrade deps:

    source env/bin/activate
    pip install -r requirements.txt
    
  2. Update Bayanat's systemd service:

    sudo systemctl edit --full bayanat.service
    

    Change the following line:

    ExecStart=/home/bayanat/bayanat/env/bin/uwsgi --master --enable-threads --threads 2  --processes 4 --http 127.0.0.1:5000  -w run:app --home env
    

    to:

    ExecStart=/bayanat/env/bin/uwsgi --ini uwsgi.ini
    
  3. Database migrations:

    1. Location migrations:

      ALTER TABLE location ADD COLUMN latlng geometry(Point, 4326);
      UPDATE location SET latlng = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326);
      ALTER TABLE location DROP COLUMN latitude, DROP COLUMN longitude;
      ALTER TABLE geo_location ALTER COLUMN latlng TYPE geometry(Point,4326) USING ST_SetSRID(latlng,4326);
      
    2. Create app_config table:

      CREATE TABLE app_config (
      id INTEGER PRIMARY KEY,
      config JSON NOT NULL,
      created_at TIMESTAMP DEFAULT current_timestamp,
      updated_at TIMESTAMP DEFAULT current_timestamp,
      deleted BOOLEAN,
      user_id INTEGER, 
      CONSTRAINT app_config_user_id_fkey FOREIGN KEY (user_id) REFERENCES "user" (id)
      );
      
    3. Component data migrations:

      -- AtobInfo table creation
      CREATE TABLE atob_info (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          reverse_title VARCHAR,
          title_tr VARCHAR,
          reverse_title_tr VARCHAR,
          created_at TIMESTAMP DEFAULT current_timestamp,
          updated_at TIMESTAMP DEFAULT current_timestamp,
          deleted BOOLEAN
      );
      
      -- AtoaInfo table creation
      CREATE TABLE atoa_info (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          reverse_title VARCHAR,
          title_tr VARCHAR,
          reverse_title_tr VARCHAR,
          created_at TIMESTAMP DEFAULT current_timestamp,
          updated_at TIMESTAMP DEFAULT current_timestamp,
          deleted BOOLEAN
      );
      
      -- BtobInfo table creation
      CREATE TABLE btob_info (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          reverse_title VARCHAR,
          title_tr VARCHAR,
          reverse_title_tr VARCHAR,
          created_at TIMESTAMP DEFAULT current_timestamp,
          updated_at TIMESTAMP DEFAULT current_timestamp,
          deleted BOOLEAN
      );
      
      -- ItoaInfo table creation
      CREATE TABLE itoa_info (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          reverse_title VARCHAR,
          title_tr VARCHAR,
          reverse_title_tr VARCHAR,
          created_at TIMESTAMP DEFAULT current_timestamp,
          updated_at TIMESTAMP DEFAULT current_timestamp,
          deleted BOOLEAN
      );
      
      -- ItobInfo table creation
      CREATE TABLE itob_info (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          reverse_title VARCHAR,
          title_tr VARCHAR,
          reverse_title_tr VARCHAR,
          created_at TIMESTAMP DEFAULT current_timestamp,
          updated_at TIMESTAMP DEFAULT current_timestamp,
          deleted BOOLEAN
      );
      
      -- ItoiInfo table creation
      CREATE TABLE itoi_info (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          reverse_title VARCHAR,
          title_tr VARCHAR,
          reverse_title_tr VARCHAR,
          created_at TIMESTAMP DEFAULT current_timestamp,
          updated_at TIMESTAMP DEFAULT current_timestamp,
          deleted BOOLEAN
      );
      
      -- Insert default relationship values as initial records --
      
      INSERT INTO atob_info (id, title) VALUES
      (1, 'Injured Party'),
      (2, 'Witness'),
      (3, 'Perpetrator'),
      (4, 'Appeared'),
      (5, 'Participant'),
      (6, 'Other');
      
      SELECT setval('atob_info_id_seq', (SELECT MAX(id) FROM atob_info));
      
      INSERT INTO atoa_info (id, title, reverse_title) VALUES
      (1, 'Same Person', 'Same Person'),
      (2, 'Duplicate', 'Duplicate'),
      (3, 'Parent', 'Child'),
      (4, 'Child', 'Parent'),
      (5, 'Sibling', 'Sibling'),
      (6, 'Spouse', 'Spouse'),
      (7, 'Superior officer', 'Subordinate officer'),
      (8, 'Subordinate officer', 'Superior officer'),
      (9, 'Subunit', 'Unit'),
      (10, 'Alleged Perpetrator', 'Injured Party'),
      (11, 'Member', 'Group'),
      (12, 'Group', 'Member'),
      (13, 'Unit', 'Subunit'),
      (14, 'Other', 'Other'),
      (15, 'Injured Party', 'Alleged Perpetrator');
      
      SELECT setval('atoa_info_id_seq', (SELECT MAX(id) FROM atoa_info));
      
      INSERT INTO btob_info (id, title) VALUES
      (1, 'Duplicate'),
      (2, 'Other'),
      (3, 'Part of a Series'),
      (4, 'Same Object'),
      (5, 'Same Person'),
      (6, 'Potentially Duplicate'),
      (7, 'Potentially Related');
      
      SELECT setval('btob_info_id_seq', (SELECT MAX(id) FROM btob_info));
      
      INSERT INTO itoa_info (id, title) VALUES
      (1, 'Injured Party'),
      (2, 'Witness'),
      (3, 'Perpetrator'),
      (4, 'Appeared'),
      (5, 'Participant'),
      (6, 'Other');
      
      SELECT setval('itoa_info_id_seq', (SELECT MAX(id) FROM itoa_info));
      
      INSERT INTO itob_info (id, title) VALUES
      (1, 'Default');
      SELECT setval('itob_info_id_seq', (SELECT MAX(id) FROM itob_info));
      
      INSERT INTO itoi_info (id, title) VALUES
      (1, 'Default');
      
      SELECT setval('itoi_info_id_seq', (SELECT MAX(id) FROM itoi_info));
      
      -- Migrate relationship values to be compatible with new primary key values --
      
      UPDATE atob
      SET related_as = ARRAY(
          SELECT elem + 1
          FROM unnest(related_as) AS t(elem)
      )
      WHERE related_as IS NOT NULL;
      
      UPDATE atoa
      SET related_as = related_as + 1
      WHERE related_as IS NOT NULL;
      
      UPDATE btob
      SET related_as = ARRAY(
          SELECT elem + 1
          FROM unnest(related_as) AS t(elem)
      )
      WHERE related_as IS NOT NULL;
      
      UPDATE itoa
      SET related_as = ARRAY(
          SELECT elem + 1
          FROM unnest(related_as) AS t(elem)
      )
      WHERE related_as IS NOT NULL;
      
      UPDATE itob
      SET related_as = related_as + 1
      WHERE related_as IS NOT NULL;
      
      UPDATE itoi
      SET related_as = related_as + 1
      WHERE related_as IS NOT NULL;
      
      -- Migrate countries for Ethnographic information and Locations --
      
      -- Creating the countries table
      CREATE TABLE countries (
          id SERIAL PRIMARY KEY,
          title VARCHAR NOT NULL,
          title_tr VARCHAR,
          created_at TIMESTAMP DEFAULT current_timestamp,
          updated_at TIMESTAMP DEFAULT current_timestamp,
          deleted BOOLEAN DEFAULT FALSE
      );
      
      -- Populating the countries table
      INSERT INTO countries (title) VALUES
          ('Afghanistan'),
          ('Albania'),
          ('Algeria'),
          ('Andorra'),
          ('Angola'),
          ('Antigua and Barbuda'),
          ('Argentina'),
          ('Armenia'),
          ('Aruba'),
          ('Australia'),
          ('Austria'),
          ('Azerbaijan'),
          ('Bahamas'),
          ('Bahrain'),
          ('Bangladesh'),
          ('Barbados'),
          ('Belarus'),
          ('Belgium'),
      

    ...

Read more

bayanat v1.23

28 Aug 19:27
Compare
Choose a tag to compare
  • Search improvements: This version focuses on improving the advanced search tool in Bayanat. The following searches are now possible:
    • Name fields in Actors.
    • Multi search for nationalities and ethnographic information in Actors.
    • Potential violation and claimed violation categories in Incident.
    • Date fields ranges in all three components.
    • Event single event search in all three components.
  • Improvements to saved search across the board:
    • The feature is now available in Actors and Incidents.
    • Saved search names are now unique to the user.
    • Saved searches can be deleted and updated.
  • Changing Bulletin-to-Bulletin relationships to multi-choice.
  • Changing Incident-to-Actor relationships to multi-choice.
  • Enable clearing certain actor fields that weren't possible to clear.
  • Enable clearing certain actor search fields as well.
  • Fixed a bug in Incident to actor relationships.
  • Fixed a bug in Location drawer where the map pin could be moved when clicking on the map. This didn't change the coordinates of the location.
  • Fixed a bug in ref search in Bulletins.
  • Fixed a bug in saving a source.
  • Fixed a bug in map visualizations of locations.
  • Upgrade deps.

The search improvements in this version were made possible by funding from the International Coalition of Sites of Conscience.

Make sure a backup is done before upgrading, and user clear their browser's cache afterwards.

The version brings major restructure to the search features in Bayanat. Unfortunately, due to these changes, previous saved searches will not work from this version and they need to be deleted. We've taken this decision as saved searches don't contain data themselves and due to the complexity of the migrations they require.

The following are the upgrade steps:

  • Upgrade deps:
source env/bin/activate
pip install -r requirements.txt
  • Database migrations:

    • Drop and regenerate Actor search index:
    ALTER TABLE actor DROP COLUMN search;
    
    ALTER TABLE actor
    ADD COLUMN search TEXT GENERATED ALWAYS AS (
    (id)::text || ' ' ||
    COALESCE(name, ''::character varying) || ' ' ||
    COALESCE(name_ar, ''::character varying) || ' ' ||
    COALESCE(originid, ''::character varying) || ' ' ||
    COALESCE(source_link, ''::character varying) || ' ' ||
    COALESCE(description, ''::text) || ' ' ||
    COALESCE(comments, ''::text)
    ) STORED;
    
    CREATE INDEX ix_actor_search ON actor USING GIN(search gin_trgm_ops);
    
    • Change Incident-to-Actor relationships to multi-choice:
    alter table itoa alter COLUMN related_as type integer[] using ARRAY[related_as];
    update itoa set related_as = '{}' where related_as='{NULL}';
    
    • Change Bulletin-Bulletin relationships to multi-choice:
    alter table btob alter COLUMN related_as type integer[] using ARRAY[related_as];
    update btob set related_as = '{}' where related_as='{NULL}';
    
    • Drop the saved searches table
    drop table query;
    
  • Use create-db command to recreated the query table:

flask create-db

bayanat v1.22.1

03 Aug 13:46
Compare
Choose a tag to compare
  • Upgrade deps
  • Increase file upload size

Make sure to take a backup before upgrading. User should clear their browser's cache for some changes after upgrades.

Requirements need to be upgraded for this version:

source env/bin/activate
pip install -r requirements.txt

bayanat v1.22

03 Aug 13:35
Compare
Choose a tag to compare
  • Further improvements to Export Tool:
    • Improving UI and introducing automatic status checks and page refresh.
    • Improving statuses.
  • Improvements to user management dashboard
    • Adding more validations for username and passwords
    • Editing password, username and email require explicit action from admin.
    • Fix a bug in user dashboard that caused passwords to be overwritten by browser autocomplete.
  • Improvements to ref search in Bulletins.
  • Added validation to detect for duplicate screenshots.
  • Fix a bug in bulk operations that caused multiple updates on items.
  • Fix a bug in preview drawers that prevented history diff from appearing.
  • Fix a bug that prevented ref addition in review dialog.
  • Fix a small annoyance where query text in search boxes is not removed after an item is selected.
  • Fix a bug in nested search in Bulletins.
  • Fix a bug in Actor name validation, modify logic to require either English or Arabic names.
  • Fix a bug in incident events.
  • Fix a bug in cropped screenshots time.
  • Fix a bug in find and replace in description boxes.
  • Upgrade deps

The Data Export Tool was made possible by funding from the International Coalition of Sites of Conscience.

Make sure to take a backup before upgrading. User should clear their browser's cache for some changes after upgrades.

Requirements need to be upgraded for this version:

source env/bin/activate
pip install -r requirements.txt

bayanat v1.21

31 May 00:30
Compare
Choose a tag to compare
  • Data Export Tool: Improved functionality and support to Actors and Incidents.
    • Improved look of PDF exports; using weasyprint library instead of FPDF.
    • Added support for CSV format in Bulletins.
    • Added support for JSON, PDF and CSV format in Actors.
    • Added support for JSON and PDF in Incidents.
  • Further improvements to Media Import tool: Path import tool will scan allowed path by default, and will only accept entry of sub-paths of that path.
  • Upgrade deps

The Data Export Tool was made possible by funding from the International Coalition of Sites of Conscience.

Make sure a backup is taken before upgrading to this version. Users should also clear their browsers' caches after any update.

To upgrade to this version, requirements should be upgraded to the new versions. You should run in the directory of the Bayanat installation:

source env/bin/activate
pip install -r requirements.txt

No migrations necessary for this version.

bayanat v1.20

20 May 02:40
Compare
Choose a tag to compare
  • Data Export Tool: This release brings the first version of Bayanat's export system. This tool allow users to request exports of items in the database and download these items in various formats.
    • Individual permission to allow non-admin users to request exports.
    • Currently enabled in Bulletins.
    • Current supported export formats are JSON and PDF.
    • Admins can approve or reject export requests.
    • Exports are downloadable after admin approval.
    • More information about the tool and its workflow can be found on Bayanat's documentation website.
  • Enable secure cookies and adding more security to the session.
  • Fix a bug in Sheets Import tool after recent upgrade to Pandas, added more validation and error handling.
  • Fix a bug in localization.
  • General code quality and security improvements.

The Data Export Tool was made possible by funding from the International Coalition of Sites of Conscience.

Make sure to take a backup before upgrading. User should clear their browser's cache for some changes after upgrades.

The following steps are needed to upgrade to this version:

  1. Upgrade requirements:
source env/bin/activate
pip install -r requirements.txt
  1. Create new database table:
export FLASK_APP=run.py
flask create-db
  1. And lastly, the following migration is needed on database:
alter table "user" add column can_export boolean default false;