Unit/System Tests Webservices PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
10 May 2026

Pull Request resolves #47740.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Add preprocessSaveData method to handle PATCH requests when no rules in the payload.

Testing Instructions

send a PATCH to /api/index.php/v1/users/levels/{id} that omits rules

{
"title": "ccTechnician"
}

Actual result BEFORE applying this Pull Request

HTTP 200, response body shows rules = [0]. The previous rules array is destroyed silently.

Expected result AFTER applying this Pull Request

only title is changed, rules is preserved.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 10 May 2026
avatar alikon alikon - change - 10 May 2026
Status New Pending
ab6d53b 10 May 2026 avatar alikon cs
avatar alikon alikon - change - 10 May 2026
Labels Added: Webservices PR-5.4-dev
avatar joomla-cms-bot joomla-cms-bot - change - 10 May 2026
Category JavaScript Unit Tests
avatar adarshdubey03 adarshdubey03 - test_item - 10 May 2026 - Tested successfully
avatar adarshdubey03
adarshdubey03 - comment - 10 May 2026

I have tested this item ✅ successfully on 516d1da

Tested Successfully!
Before the patch:

{
"errors": [
{
"title": "Field required: id"
}
]
}
And after the patch:

{
"links": {
"self": "http://localhost/joomla-cms/api/index.php/v1/users/levels"
},
"data": {
"type": "levels",
"id": "7",
"attributes": {
"id": 7,
"title": "aaTechnician",
"rules": [
1,
2
]
}
}
}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47751.

avatar adarshdubey03
adarshdubey03 - comment - 10 May 2026

I have tested this item ✅ successfully on 516d1da

Tested Successfully!
Before the patch:

{
"errors": [
{
"title": "Field required: id"
}
]
}
And after the patch:

{
"links": {
"self": "http://localhost/joomla-cms/api/index.php/v1/users/levels"
},
"data": {
"type": "levels",
"id": "7",
"attributes": {
"id": 7,
"title": "aaTechnician",
"rules": [
1,
2
]
}
}
}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47751.

avatar adarshdubey03
adarshdubey03 - comment - 10 May 2026

I have tested this item ✅ successfully on 516d1da

Tested Successfully!
Before the patch:

{
"errors": [
{
"title": "Field required: id"
}
]
}
And after the patch:

{
"links": {
"self": "http://localhost/joomla-cms/api/index.php/v1/users/levels"
},
"data": {
"type": "levels",
"id": "7",
"attributes": {
"id": 7,
"title": "aaTechnician",
"rules": [
1,
2
]
}
}
}


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47751.

avatar richard67
richard67 - comment - 10 May 2026

@adarshdubey03 Can it be that you have reported your test result in the wrong PR? This one here is still draft, and your test result fits better to #47748 .

avatar adarshdubey03 adarshdubey03 - test_item - 10 May 2026 - Not tested
avatar adarshdubey03
adarshdubey03 - comment - 10 May 2026

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47751.

avatar adarshdubey03
adarshdubey03 - comment - 10 May 2026

I have not tested this item.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47751.

avatar alikon alikon - change - 11 May 2026
Labels Added: Unit/System Tests
avatar alikon
alikon - comment - 11 May 2026

the test failure will be solved when pr #47748 will be merged

Add a Comment

Login with GitHub to post a comment