[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #28 from Kyle M Hall (khall)  ---
Created attachment 193060
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193060&action=edit
Bug 40383: Tidy t/Edifact.t for QA script

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #27 from Kyle M Hall (khall)  ---
Created attachment 193059
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193059&action=edit
Bug 40383: Add Cypress test coverage for EDIFACT modal

This patch adds end-to-end testing for the EDIFACT modal interface,
providing coverage of all user interactions and functionality.

**Test Coverage:**
- Modal display and initialization with proper Bootstrap navbar structure
- View toggle functionality between tree and raw display modes
- Search functionality including navigation, result counting, and highlighting
- Focus functionality for basket and invoice contexts
- Error handling for invalid message IDs and network failures
- Accessibility features including keyboard navigation
- Responsive behavior and modal interaction patterns

**Test Plan:**
1. Apply patch
2. Ensure KTD environment is running with test data
3. Run tests: `npx cypress run --spec
"t/cypress/integration/Acquisitions/Edifact*"`
4. **Verify Test Results:**
5. **Manual Verification:**
   - All test scenarios reflect real user workflows
   - Test data requirements are clearly documented in spec file
   - Test data is cleaned up after the tests are run

Signed-off-by: Hannah Dunne-Howrie 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #26 from Kyle M Hall (khall)  ---
Created attachment 193058
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193058&action=edit
Bug 40383: Enhanced EDIFACT message modal with search and focus functionality

This patch completely rebuilds the EDIFACT message modal interface, featuring:

**Core Features:**
- Modern Bootstrap 5 navbar with integrated search functionality
- Tree view and raw view display modes for message structure
- Real-time search with regex support and result navigation
- Smart focus functionality that highlights relevant segments based on
  context (basket, invoice)

**User Interface:**
- Bootstrap navbar between modal header and body
- Search form with previous/next navigation and live result counts
- Clean separation between always-visible controls and view-specific toolbars
- Accessibility conscious with proper ARIA labels and semantic markup
- Streamlined DOM structure with direct modal-body scrolling

**Test Plan:**
1. Apply patch and run: yarn css:build to compile SCSS
2. Navigate to Acquisitions > EDIFACT messages
3. Click "View message" on any EDIFACT message
4. **Modal Display Testing:**
   - Verify modal opens with Bootstrap navbar between header and body
   - Confirm tree view is active by default with segment structure visible
   - Click raw view button to verify plain text display
   - Test modal responsiveness by resizing window
5. **Search Functionality Testing:**
   - Enter "UNH" in search field, verify navbar shows result count
   - Use previous/next buttons to navigate between results
   - Test search with terms like "ORDER", "NAD", "LIN" - all results should be
found
   - Verify native browser clear button appears and works
   - Test case-insensitive search behavior
6. **Focus Functionality Testing:**
   - From basket page, click enhanced view link - should highlight relevant
segments
   - From invoice page, click enhanced view - should focus on invoice-related
segments
   - Verify focus highlighting persists during search operations
7. **Error Handling Testing:**
   - Test with invalid message ID, verify error display
   - Test network errors, confirm loading states work properly
8. **Accessibility Testing:**
   - Verify keyboard navigation works with search controls
   - Test screen reader compatibility with ARIA labels
   - Confirm modal can be closed with Escape key

Signed-off-by: Hannah Dunne-Howrie 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #25 from Kyle M Hall (khall)  ---
Created attachment 193057
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193057&action=edit
Bug 40383: Add JSON representation to Koha::Edifact and JSON download to
edimsg.pl

This patch implements a JSON representation of EDIFACT interchanges for
enhanced
programmatic access and debugging capabilities.

Backend Changes:
- Add to_json() method to Koha::Edifact module
- Structured JSON output with header, messages array, and trailer
- Segment parsing with raw data, elements arrays, and line_id tracking
- Line item grouping using LIN segment identifiers

Frontend Changes:
- Add JSON download button to edimsg.pl page
- Support for ?format=json parameter and Accept: application/json header
- Proper HTTP content-type handling for JSON responses
- Error handling for missing messages in JSON format

JSON Structure:
{
  "header": "UNB+UNOC:3+...",
  "messages": [
{
  "header": "UNH+1+QUOTES:D:93A:UN:EAN008'",
  "segments": [
{
  "tag": "LIN",
  "raw": "LIN+1+1+9780552150040:EN'",
  "elements": ["1", "1", "9780552150040:EN"],
  "line_id": "1"
}
  ],
  "trailer": "UNT+25+1'"
}
  ],
  "trailer": "UNZ+1+1'"
}

Test plan:
1. Apply this patch
2. Ensure you have EDIFACT messages in your system
3. Go to Acquisitions > EDIFACT messages
4. Click "View message" for any message
5. Click the new "JSON" button
6. Verify JSON downloads with proper structure
7. Verify direct URL access with ?format=json parameter works
8. Test with Accept: application/json header

Signed-off-by: Hannah Dunne-Howrie 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Kyle M Hall (khall)  changed:

   What|Removed |Added

 Attachment #192530|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Kyle M Hall (khall)  changed:

   What|Removed |Added

 Attachment #192529|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Kyle M Hall (khall)  changed:

   What|Removed |Added

 Attachment #192528|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Kyle M Hall (khall)  changed:

   What|Removed |Added

 Attachment #192527|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Kyle M Hall (khall)  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #24 from Martin Renvoize (ashimema) 
 ---
Just another rebase

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #23 from Martin Renvoize (ashimema) 
 ---
Created attachment 192530
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192530&action=edit
Bug 40383: Add Cypress test coverage for EDIFACT modal

This patch adds end-to-end testing for the EDIFACT modal interface,
providing coverage of all user interactions and functionality.

**Test Coverage:**
- Modal display and initialization with proper Bootstrap navbar structure
- View toggle functionality between tree and raw display modes
- Search functionality including navigation, result counting, and highlighting
- Focus functionality for basket and invoice contexts
- Error handling for invalid message IDs and network failures
- Accessibility features including keyboard navigation
- Responsive behavior and modal interaction patterns

**Test Plan:**
1. Apply patch
2. Ensure KTD environment is running with test data
3. Run tests: `npx cypress run --spec
"t/cypress/integration/Acquisitions/Edifact*"`
4. **Verify Test Results:**
5. **Manual Verification:**
   - All test scenarios reflect real user workflows
   - Test data requirements are clearly documented in spec file
   - Test data is cleaned up after the tests are run

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #22 from Martin Renvoize (ashimema) 
 ---
Created attachment 192529
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192529&action=edit
Bug 40383: Enhanced EDIFACT message modal with search and focus functionality

This patch completely rebuilds the EDIFACT message modal interface, featuring:

**Core Features:**
- Modern Bootstrap 5 navbar with integrated search functionality
- Tree view and raw view display modes for message structure
- Real-time search with regex support and result navigation
- Smart focus functionality that highlights relevant segments based on
  context (basket, invoice)

**User Interface:**
- Bootstrap navbar between modal header and body
- Search form with previous/next navigation and live result counts
- Clean separation between always-visible controls and view-specific toolbars
- Accessibility conscious with proper ARIA labels and semantic markup
- Streamlined DOM structure with direct modal-body scrolling

**Test Plan:**
1. Apply patch and run: yarn css:build to compile SCSS
2. Navigate to Acquisitions > EDIFACT messages
3. Click "View message" on any EDIFACT message
4. **Modal Display Testing:**
   - Verify modal opens with Bootstrap navbar between header and body
   - Confirm tree view is active by default with segment structure visible
   - Click raw view button to verify plain text display
   - Test modal responsiveness by resizing window
5. **Search Functionality Testing:**
   - Enter "UNH" in search field, verify navbar shows result count
   - Use previous/next buttons to navigate between results
   - Test search with terms like "ORDER", "NAD", "LIN" - all results should be
found
   - Verify native browser clear button appears and works
   - Test case-insensitive search behavior
6. **Focus Functionality Testing:**
   - From basket page, click enhanced view link - should highlight relevant
segments
   - From invoice page, click enhanced view - should focus on invoice-related
segments
   - Verify focus highlighting persists during search operations
7. **Error Handling Testing:**
   - Test with invalid message ID, verify error display
   - Test network errors, confirm loading states work properly
8. **Accessibility Testing:**
   - Verify keyboard navigation works with search controls
   - Test screen reader compatibility with ARIA labels
   - Confirm modal can be closed with Escape key

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #21 from Martin Renvoize (ashimema) 
 ---
Created attachment 192528
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192528&action=edit
Bug 40383: Add JSON representation to Koha::Edifact and JSON download to
edimsg.pl

This patch implements a JSON representation of EDIFACT interchanges for
enhanced
programmatic access and debugging capabilities.

Backend Changes:
- Add to_json() method to Koha::Edifact module
- Structured JSON output with header, messages array, and trailer
- Segment parsing with raw data, elements arrays, and line_id tracking
- Line item grouping using LIN segment identifiers

Frontend Changes:
- Add JSON download button to edimsg.pl page
- Support for ?format=json parameter and Accept: application/json header
- Proper HTTP content-type handling for JSON responses
- Error handling for missing messages in JSON format

JSON Structure:
{
  "header": "UNB+UNOC:3+...",
  "messages": [
{
  "header": "UNH+1+QUOTES:D:93A:UN:EAN008'",
  "segments": [
{
  "tag": "LIN",
  "raw": "LIN+1+1+9780552150040:EN'",
  "elements": ["1", "1", "9780552150040:EN"],
  "line_id": "1"
}
  ],
  "trailer": "UNT+25+1'"
}
  ],
  "trailer": "UNZ+1+1'"
}

Test plan:
1. Apply this patch
2. Ensure you have EDIFACT messages in your system
3. Go to Acquisitions > EDIFACT messages
4. Click "View message" for any message
5. Click the new "JSON" button
6. Verify JSON downloads with proper structure
7. Verify direct URL access with ?format=json parameter works
8. Test with Accept: application/json header

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #20 from Martin Renvoize (ashimema) 
 ---
Created attachment 192527
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192527&action=edit
Bug 40383: Add unit tests for Koha::Edifact to_json method

This patch adds unit tests for the new to_json method being introduced
in Koha::Edifact module in the next patch.

The tests verify:
- JSON output generation and validity
- Proper structure with header, messages, and trailer fields
- Message array structure with correct number of messages
- Individual message structure (header, segments, trailer)
- Segment data integrity including raw data and elements arrays
- Line ID functionality for related segments (LIN, QTY, PRI, PIA)

Test plan:
1. Apply this patch and the next one
2. Run: prove t/Edifact.t
3. Verify all 63 tests pass
4. Confirm the new JSON-related tests (22 tests) execute successfully

Sponsored-by: Martin Renvoize 
Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189578|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189577|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189576|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #189575|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-02-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Signed Off
Comma delimited||Martin Renvoize
   list of Sponsors||
 Sponsorship status|--- |Sponsored

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2026-01-30 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Kyle M Hall (khall)  changed:

   What|Removed |Added

 Status|Signed Off  |Patch doesn't apply

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-11-25 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Blocks||41297


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41297
[Bug 41297] Add duplicate invoice number detection on EDI invoice import
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-11-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188580|0   |1
is obsolete||

--- Comment #19 from Martin Renvoize (ashimema) 
 ---
Created attachment 189578
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189578&action=edit
Bug 40383: Add Cypress test coverage for EDIFACT modal

This patch adds end-to-end testing for the EDIFACT modal interface,
providing coverage of all user interactions and functionality.

**Test Coverage:**
- Modal display and initialization with proper Bootstrap navbar structure
- View toggle functionality between tree and raw display modes
- Search functionality including navigation, result counting, and highlighting
- Focus functionality for basket and invoice contexts
- Error handling for invalid message IDs and network failures
- Accessibility features including keyboard navigation
- Responsive behavior and modal interaction patterns

**Test Plan:**
1. Apply patch
2. Ensure KTD environment is running with test data
3. Run tests: `npx cypress run --spec
"t/cypress/integration/Acquisitions/Edifact*"`
4. **Verify Test Results:**
5. **Manual Verification:**
   - All test scenarios reflect real user workflows
   - Test data requirements are clearly documented in spec file
   - Test data is cleaned up after the tests are run

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-11-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188579|0   |1
is obsolete||

--- Comment #18 from Martin Renvoize (ashimema) 
 ---
Created attachment 189577
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189577&action=edit
Bug 40383: Enhanced EDIFACT message modal with search and focus functionality

This patch completely rebuilds the EDIFACT message modal interface, featuring:

**Core Features:**
- Modern Bootstrap 5 navbar with integrated search functionality
- Tree view and raw view display modes for message structure
- Real-time search with regex support and result navigation
- Smart focus functionality that highlights relevant segments based on
  context (basket, invoice)

**User Interface:**
- Bootstrap navbar between modal header and body
- Search form with previous/next navigation and live result counts
- Clean separation between always-visible controls and view-specific toolbars
- Accessibility conscious with proper ARIA labels and semantic markup
- Streamlined DOM structure with direct modal-body scrolling

**Test Plan:**
1. Apply patch and run: yarn css:build to compile SCSS
2. Navigate to Acquisitions > EDIFACT messages
3. Click "View message" on any EDIFACT message
4. **Modal Display Testing:**
   - Verify modal opens with Bootstrap navbar between header and body
   - Confirm tree view is active by default with segment structure visible
   - Click raw view button to verify plain text display
   - Test modal responsiveness by resizing window
5. **Search Functionality Testing:**
   - Enter "UNH" in search field, verify navbar shows result count
   - Use previous/next buttons to navigate between results
   - Test search with terms like "ORDER", "NAD", "LIN" - all results should be
found
   - Verify native browser clear button appears and works
   - Test case-insensitive search behavior
6. **Focus Functionality Testing:**
   - From basket page, click enhanced view link - should highlight relevant
segments
   - From invoice page, click enhanced view - should focus on invoice-related
segments
   - Verify focus highlighting persists during search operations
7. **Error Handling Testing:**
   - Test with invalid message ID, verify error display
   - Test network errors, confirm loading states work properly
8. **Accessibility Testing:**
   - Verify keyboard navigation works with search controls
   - Test screen reader compatibility with ARIA labels
   - Confirm modal can be closed with Escape key

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-11-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188578|0   |1
is obsolete||

--- Comment #17 from Martin Renvoize (ashimema) 
 ---
Created attachment 189576
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189576&action=edit
Bug 40383: Add JSON representation to Koha::Edifact and JSON download to
edimsg.pl

This patch implements a JSON representation of EDIFACT interchanges for
enhanced
programmatic access and debugging capabilities.

Backend Changes:
- Add to_json() method to Koha::Edifact module
- Structured JSON output with header, messages array, and trailer
- Segment parsing with raw data, elements arrays, and line_id tracking
- Line item grouping using LIN segment identifiers

Frontend Changes:
- Add JSON download button to edimsg.pl page
- Support for ?format=json parameter and Accept: application/json header
- Proper HTTP content-type handling for JSON responses
- Error handling for missing messages in JSON format

JSON Structure:
{
  "header": "UNB+UNOC:3+...",
  "messages": [
{
  "header": "UNH+1+QUOTES:D:93A:UN:EAN008'",
  "segments": [
{
  "tag": "LIN",
  "raw": "LIN+1+1+9780552150040:EN'",
  "elements": ["1", "1", "9780552150040:EN"],
  "line_id": "1"
}
  ],
  "trailer": "UNT+25+1'"
}
  ],
  "trailer": "UNZ+1+1'"
}

Test plan:
1. Apply this patch
2. Ensure you have EDIFACT messages in your system
3. Go to Acquisitions > EDIFACT messages
4. Click "View message" for any message
5. Click the new "JSON" button
6. Verify JSON downloads with proper structure
7. Verify direct URL access with ?format=json parameter works
8. Test with Accept: application/json header

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-11-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #188577|0   |1
is obsolete||

--- Comment #16 from Martin Renvoize (ashimema) 
 ---
Created attachment 189575
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189575&action=edit
Bug 40383: Add unit tests for Koha::Edifact to_json method

This patch adds unit tests for the new to_json method being introduced
in Koha::Edifact module in the next patch.

The tests verify:
- JSON output generation and validity
- Proper structure with header, messages, and trailer fields
- Message array structure with correct number of messages
- Individual message structure (header, segments, trailer)
- Segment data integrity including raw data and elements arrays
- Line ID functionality for related segments (LIN, QTY, PRI, PIA)

Test plan:
1. Apply this patch and the next one
2. Run: prove t/Edifact.t
3. Verify all 63 tests pass
4. Confirm the new JSON-related tests (22 tests) execute successfully

Sponsored-by: Martin Renvoize 
Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #15 from Martin Renvoize (ashimema) 
 ---
Test plan fun.. thanks for looking Kyle. Should all apply again now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 QA Contact|[email protected] |[email protected]
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #187561|0   |1
is obsolete||

--- Comment #14 from Martin Renvoize (ashimema) 
 ---
Created attachment 188580
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188580&action=edit
Bug 40383: Add Cypress test coverage for EDIFACT modal

This patch adds end-to-end testing for the EDIFACT modal interface,
providing coverage of all user interactions and functionality.

**Test Coverage:**
- Modal display and initialization with proper Bootstrap navbar structure
- View toggle functionality between tree and raw display modes
- Search functionality including navigation, result counting, and highlighting
- Focus functionality for basket and invoice contexts
- Error handling for invalid message IDs and network failures
- Accessibility features including keyboard navigation
- Responsive behavior and modal interaction patterns

**Test Plan:**
1. Apply patch
2. Ensure KTD environment is running with test data
3. Run tests: `npx cypress run --spec
"t/cypress/integration/Acquisitions/Edifact*"`
4. **Verify Test Results:**
5. **Manual Verification:**
   - All test scenarios reflect real user workflows
   - Test data requirements are clearly documented in spec file
   - Test data is cleaned up after the tests are run

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #187560|0   |1
is obsolete||

--- Comment #13 from Martin Renvoize (ashimema) 
 ---
Created attachment 188579
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188579&action=edit
Bug 40383: Enhanced EDIFACT message modal with search and focus functionality

This patch completely rebuilds the EDIFACT message modal interface, featuring:

**Core Features:**
- Modern Bootstrap 5 navbar with integrated search functionality
- Tree view and raw view display modes for message structure
- Real-time search with regex support and result navigation
- Smart focus functionality that highlights relevant segments based on
  context (basket, invoice)

**User Interface:**
- Bootstrap navbar between modal header and body
- Search form with previous/next navigation and live result counts
- Clean separation between always-visible controls and view-specific toolbars
- Accessibility conscious with proper ARIA labels and semantic markup
- Streamlined DOM structure with direct modal-body scrolling

**Test Plan:**
1. Apply patch and run: yarn css:build to compile SCSS
2. Navigate to Acquisitions > EDIFACT messages
3. Click "View message" on any EDIFACT message
4. **Modal Display Testing:**
   - Verify modal opens with Bootstrap navbar between header and body
   - Confirm tree view is active by default with segment structure visible
   - Click raw view button to verify plain text display
   - Test modal responsiveness by resizing window
5. **Search Functionality Testing:**
   - Enter "UNH" in search field, verify navbar shows result count
   - Use previous/next buttons to navigate between results
   - Test search with terms like "ORDER", "NAD", "LIN" - all results should be
found
   - Verify native browser clear button appears and works
   - Test case-insensitive search behavior
6. **Focus Functionality Testing:**
   - From basket page, click enhanced view link - should highlight relevant
segments
   - From invoice page, click enhanced view - should focus on invoice-related
segments
   - Verify focus highlighting persists during search operations
7. **Error Handling Testing:**
   - Test with invalid message ID, verify error display
   - Test network errors, confirm loading states work properly
8. **Accessibility Testing:**
   - Verify keyboard navigation works with search controls
   - Test screen reader compatibility with ARIA labels
   - Confirm modal can be closed with Escape key

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #187559|0   |1
is obsolete||

--- Comment #12 from Martin Renvoize (ashimema) 
 ---
Created attachment 188578
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188578&action=edit
Bug 40383: Add JSON representation to Koha::Edifact and JSON download to
edimsg.pl

This patch implements a JSON representation of EDIFACT interchanges for
enhanced
programmatic access and debugging capabilities.

Backend Changes:
- Add to_json() method to Koha::Edifact module
- Structured JSON output with header, messages array, and trailer
- Segment parsing with raw data, elements arrays, and line_id tracking
- Line item grouping using LIN segment identifiers

Frontend Changes:
- Add JSON download button to edimsg.pl page
- Support for ?format=json parameter and Accept: application/json header
- Proper HTTP content-type handling for JSON responses
- Error handling for missing messages in JSON format

JSON Structure:
{
  "header": "UNB+UNOC:3+...",
  "messages": [
{
  "header": "UNH+1+QUOTES:D:93A:UN:EAN008'",
  "segments": [
{
  "tag": "LIN",
  "raw": "LIN+1+1+9780552150040:EN'",
  "elements": ["1", "1", "9780552150040:EN"],
  "line_id": "1"
}
  ],
  "trailer": "UNT+25+1'"
}
  ],
  "trailer": "UNZ+1+1'"
}

Test plan:
1. Apply this patch
2. Ensure you have EDIFACT messages in your system
3. Go to Acquisitions > EDIFACT messages
4. Click "View message" for any message
5. Click the new "JSON" button
6. Verify JSON downloads with proper structure
7. Verify direct URL access with ?format=json parameter works
8. Test with Accept: application/json header

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #187558|0   |1
is obsolete||

--- Comment #11 from Martin Renvoize (ashimema) 
 ---
Created attachment 188577
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188577&action=edit
Bug 40383: Add unit tests for Koha::Edifact to_json method

This patch adds unit tests for the new to_json method being introduced
in Koha::Edifact module in the next patch.

The tests verify:
- JSON output generation and validity
- Proper structure with header, messages, and trailer fields
- Message array structure with correct number of messages
- Individual message structure (header, segments, trailer)
- Segment data integrity including raw data and elements arrays
- Line ID functionality for related segments (LIN, QTY, PRI, PIA)

Test plan:
1. Apply this patch and the next one
2. Run: prove t/Edifact.t
3. Verify all 63 tests pass
4. Confirm the new JSON-related tests (22 tests) execute successfully

Sponsored-by: Martin Renvoize 
Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-25 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383
Bug 40383 depends on bug 40174, which changed state.

Bug 40174 Summary: Add a way to cleanly insert data in DB from Cypress tests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

   What|Removed |Added

 Status|Needs documenting   |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-24 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Kyle M Hall (khall)  changed:

   What|Removed |Added

 Status|Signed Off  |Patch doesn't apply

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #184489|0   |1
is obsolete||

--- Comment #8 from Martin Renvoize (ashimema) 
 ---
Created attachment 187560
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187560&action=edit
Bug 40383: Enhanced EDIFACT message modal with search and focus functionality

This patch completely rebuilds the EDIFACT message modal interface, featuring:

**Core Features:**
- Modern Bootstrap 5 navbar with integrated search functionality
- Tree view and raw view display modes for message structure
- Real-time search with regex support and result navigation
- Smart focus functionality that highlights relevant segments based on
  context (basket, invoice)

**User Interface:**
- Bootstrap navbar between modal header and body
- Search form with previous/next navigation and live result counts
- Clean separation between always-visible controls and view-specific toolbars
- Accessibility conscious with proper ARIA labels and semantic markup
- Streamlined DOM structure with direct modal-body scrolling

**Test Plan:**
1. Apply patch and run: yarn css:build to compile SCSS
2. Navigate to Acquisitions > EDIFACT messages
3. Click "View message" on any EDIFACT message
4. **Modal Display Testing:**
   - Verify modal opens with Bootstrap navbar between header and body
   - Confirm tree view is active by default with segment structure visible
   - Click raw view button to verify plain text display
   - Test modal responsiveness by resizing window
5. **Search Functionality Testing:**
   - Enter "UNH" in search field, verify navbar shows result count
   - Use previous/next buttons to navigate between results
   - Test search with terms like "ORDER", "NAD", "LIN" - all results should be
found
   - Verify native browser clear button appears and works
   - Test case-insensitive search behavior
6. **Focus Functionality Testing:**
   - From basket page, click enhanced view link - should highlight relevant
segments
   - From invoice page, click enhanced view - should focus on invoice-related
segments
   - Verify focus highlighting persists during search operations
7. **Error Handling Testing:**
   - Test with invalid message ID, verify error display
   - Test network errors, confirm loading states work properly
8. **Accessibility Testing:**
   - Verify keyboard navigation works with search controls
   - Test screen reader compatibility with ARIA labels
   - Confirm modal can be closed with Escape key

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-17 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #184488|0   |1
is obsolete||

--- Comment #7 from Martin Renvoize (ashimema) 
 ---
Created attachment 187559
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187559&action=edit
Bug 40383: Add JSON representation to Koha::Edifact and JSON download to
edimsg.pl

This patch implements a JSON representation of EDIFACT interchanges for
enhanced
programmatic access and debugging capabilities.

Backend Changes:
- Add to_json() method to Koha::Edifact module
- Structured JSON output with header, messages array, and trailer
- Segment parsing with raw data, elements arrays, and line_id tracking
- Line item grouping using LIN segment identifiers

Frontend Changes:
- Add JSON download button to edimsg.pl page
- Support for ?format=json parameter and Accept: application/json header
- Proper HTTP content-type handling for JSON responses
- Error handling for missing messages in JSON format

JSON Structure:
{
  "header": "UNB+UNOC:3+...",
  "messages": [
{
  "header": "UNH+1+QUOTES:D:93A:UN:EAN008'",
  "segments": [
{
  "tag": "LIN",
  "raw": "LIN+1+1+9780552150040:EN'",
  "elements": ["1", "1", "9780552150040:EN"],
  "line_id": "1"
}
  ],
  "trailer": "UNT+25+1'"
}
  ],
  "trailer": "UNZ+1+1'"
}

Test plan:
1. Apply this patch
2. Ensure you have EDIFACT messages in your system
3. Go to Acquisitions > EDIFACT messages
4. Click "View message" for any message
5. Click the new "JSON" button
6. Verify JSON downloads with proper structure
7. Verify direct URL access with ?format=json parameter works
8. Test with Accept: application/json header

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-17 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #184487|0   |1
is obsolete||

--- Comment #6 from Martin Renvoize (ashimema) 
 ---
Created attachment 187558
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187558&action=edit
Bug 40383: Add unit tests for Koha::Edifact to_json method

This patch adds unit tests for the new to_json method being introduced
in Koha::Edifact module in the next patch.

The tests verify:
- JSON output generation and validity
- Proper structure with header, messages, and trailer fields
- Message array structure with correct number of messages
- Individual message structure (header, segments, trailer)
- Segment data integrity including raw data and elements arrays
- Line ID functionality for related segments (LIN, QTY, PRI, PIA)

Test plan:
1. Apply this patch and the next one
2. Run: prove t/Edifact.t
3. Verify all 63 tests pass
4. Confirm the new JSON-related tests (22 tests) execute successfully

Sponsored-by: Martin Renvoize 
Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-08 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #10 from Martin Renvoize (ashimema) 
 ---
Hannah and I have been using this for debugging messages on their live system.
It's gone a long way to making EDI message more understandable and accessible

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-10-08 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #184490|0   |1
is obsolete||

--- Comment #9 from Martin Renvoize (ashimema) 
 ---
Created attachment 187561
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187561&action=edit
Bug 40383: Add Cypress test coverage for EDIFACT modal

This patch adds end-to-end testing for the EDIFACT modal interface,
providing coverage of all user interactions and functionality.

**Test Coverage:**
- Modal display and initialization with proper Bootstrap navbar structure
- View toggle functionality between tree and raw display modes
- Search functionality including navigation, result counting, and highlighting
- Focus functionality for basket and invoice contexts
- Error handling for invalid message IDs and network failures
- Accessibility features including keyboard navigation
- Responsive behavior and modal interaction patterns

**Test Plan:**
1. Apply patch
2. Ensure KTD environment is running with test data
3. Run tests: `npx cypress run --spec
"t/cypress/integration/Acquisitions/Edifact*"`
4. **Verify Test Results:**
5. **Manual Verification:**
   - All test scenarios reflect real user workflows
   - Test data requirements are clearly documented in spec file
   - Test data is cleaned up after the tests are run

Signed-off-by: Hannah Dunne-Howrie 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-08-04 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

Version|24.11   |Main

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-23 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Blocks||32938


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32938
[Bug 32938] Acquisitions EDI - ORDRSP messages are loaded as invoices
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 CC||[email protected]

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #5 from Martin Renvoize (ashimema) 
 ---
Created attachment 184490
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184490&action=edit
Bug 40383: Add Cypress test coverage for EDIFACT modal

This patch adds end-to-end testing for the EDIFACT modal interface,
providing coverage of all user interactions and functionality.

**Test Coverage:**
- Modal display and initialization with proper Bootstrap navbar structure
- View toggle functionality between tree and raw display modes
- Search functionality including navigation, result counting, and highlighting
- Focus functionality for basket and invoice contexts
- Error handling for invalid message IDs and network failures
- Accessibility features including keyboard navigation
- Responsive behavior and modal interaction patterns

**Test Plan:**
1. Apply patch
2. Ensure KTD environment is running with test data
3. Run tests: `npx cypress run --spec
"t/cypress/integration/Acquisitions/Edifact*"`
4. **Verify Test Results:**
5. **Manual Verification:**
   - All test scenarios reflect real user workflows
   - Test data requirements are clearly documented in spec file
   - Test data is cleaned up after the tests are run

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #4 from Martin Renvoize (ashimema) 
 ---
Created attachment 184489
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184489&action=edit
Bug 40383: Enhanced EDIFACT message modal with search and focus functionality

This patch completely rebuilds the EDIFACT message modal interface, featuring:

**Core Features:**
- Modern Bootstrap 5 navbar with integrated search functionality
- Tree view and raw view display modes for message structure
- Real-time search with regex support and result navigation
- Smart focus functionality that highlights relevant segments based on
  context (basket, invoice)

**User Interface:**
- Bootstrap navbar between modal header and body
- Search form with previous/next navigation and live result counts
- Clean separation between always-visible controls and view-specific toolbars
- Accessibility conscious with proper ARIA labels and semantic markup
- Streamlined DOM structure with direct modal-body scrolling

**Test Plan:**
1. Apply patch and run: yarn css:build to compile SCSS
2. Navigate to Acquisitions > EDIFACT messages
3. Click "View message" on any EDIFACT message
4. **Modal Display Testing:**
   - Verify modal opens with Bootstrap navbar between header and body
   - Confirm tree view is active by default with segment structure visible
   - Click raw view button to verify plain text display
   - Test modal responsiveness by resizing window
5. **Search Functionality Testing:**
   - Enter "UNH" in search field, verify navbar shows result count
   - Use previous/next buttons to navigate between results
   - Test search with terms like "ORDER", "NAD", "LIN" - all results should be
found
   - Verify native browser clear button appears and works
   - Test case-insensitive search behavior
6. **Focus Functionality Testing:**
   - From basket page, click enhanced view link - should highlight relevant
segments
   - From invoice page, click enhanced view - should focus on invoice-related
segments
   - Verify focus highlighting persists during search operations
7. **Error Handling Testing:**
   - Test with invalid message ID, verify error display
   - Test network errors, confirm loading states work properly
8. **Accessibility Testing:**
   - Verify keyboard navigation works with search controls
   - Test screen reader compatibility with ARIA labels
   - Confirm modal can be closed with Escape key

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #3 from Martin Renvoize (ashimema) 
 ---
Created attachment 184488
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184488&action=edit
Bug 40383: Add JSON representation to Koha::Edifact and JSON download to
edimsg.pl

This patch implements a JSON representation of EDIFACT interchanges for
enhanced
programmatic access and debugging capabilities.

Backend Changes:
- Add to_json() method to Koha::Edifact module
- Structured JSON output with header, messages array, and trailer
- Segment parsing with raw data, elements arrays, and line_id tracking
- Line item grouping using LIN segment identifiers

Frontend Changes:
- Add JSON download button to edimsg.pl page
- Support for ?format=json parameter and Accept: application/json header
- Proper HTTP content-type handling for JSON responses
- Error handling for missing messages in JSON format

JSON Structure:
{
  "header": "UNB+UNOC:3+...",
  "messages": [
{
  "header": "UNH+1+QUOTES:D:93A:UN:EAN008'",
  "segments": [
{
  "tag": "LIN",
  "raw": "LIN+1+1+9780552150040:EN'",
  "elements": ["1", "1", "9780552150040:EN"],
  "line_id": "1"
}
  ],
  "trailer": "UNT+25+1'"
}
  ],
  "trailer": "UNZ+1+1'"
}

Test plan:
1. Apply this patch
2. Ensure you have EDIFACT messages in your system
3. Go to Acquisitions > EDIFACT messages
4. Click "View message" for any message
5. Click the new "JSON" button
6. Verify JSON downloads with proper structure
7. Verify direct URL access with ?format=json parameter works
8. Test with Accept: application/json header

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #2 from Martin Renvoize (ashimema) 
 ---
Created attachment 184487
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184487&action=edit
Bug 40383: Add unit tests for Koha::Edifact to_json method

This patch adds unit tests for the new to_json method being introduced
in Koha::Edifact module in the next patch.

The tests verify:
- JSON output generation and validity
- Proper structure with header, messages, and trailer fields
- Message array structure with correct number of messages
- Individual message structure (header, segments, trailer)
- Segment data integrity including raw data and elements arrays
- Line ID functionality for related segments (LIN, QTY, PRI, PIA)

Test plan:
1. Apply this patch and the next one
2. Run: prove t/Edifact.t
3. Verify all 63 tests pass
4. Confirm the new JSON-related tests (22 tests) execute successfully

Sponsored-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Depends on||40174


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174
[Bug 40174] Add a way to cleanly insert data in DB from Cypress tests
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Depends on||20253


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20253
[Bug 20253] Optionally use buyer's purchase order number from EDIFACT quote in
basket name
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-17 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #1 from Martin Renvoize (ashimema) 
 ---
Created attachment 184185
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184185&action=edit
Preview

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40383] Modernise the EDIFACT Message display modal

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

   Assignee|[email protected] |[email protected]
   |ity.org |o.uk

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/