[#13606] - REST API - jobs service - bulk update error

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

According to the documentation (https://community.jaspersoft.com/documentation/tibco-jasperreports-serve...):

"You can describe nested structures by using the nestedNameModel equivalent element. Like the jobModel, nested model elements contain only the subset that you want to modify. Thus you could change one value within a parameter, the end date within a schedule, or an email address within a notification."

When POSTing to this endpoint with the following jobmodel:

{
"sourceModel": {
"parametersModel": {
"parameterValuesModel": {
"REPORTTITLE": ["myTitle"],
"LEVEL_1": ["myLevel1Attribute"],
"LEVEL_2": ["myLevel2Attribute"],
"WHERE_1": ["myWhere1Condition"],
"WHERE_2": ["myWhere1Condition"],
"DATA_SOURCE": ["myDataSource"],
"REPORT_TIME_ZONE": ["myContinent/myCapital"],
"FROM_YEAR": ["2019"],
"TO_YEAR": ["2022"]
}
}
}
}

I received the following error: {"message":"jsexception.null.uri"}.

When adding the reportUnitURI parameter to the payload:
{
"sourceModel": {
"reportUnitURI": "/myFolder/myReport",
"parametersModel": {
"parameterValuesModel": {
"REPORTTITLE": ["myTitle"],
"LEVEL_1": ["myLevel1Attribute"],
"LEVEL_2": ["myLevel2Attribute"],
"WHERE_1": ["myWhere1Condition"],
"WHERE_2": ["myWhere1Condition"],
"DATA_SOURCE": ["myDataSource"],
"REPORT_TIME_ZONE": ["myContinent/myCapital"],
"FROM_YEAR": ["myFromYear"],
"TO_YEAR": ["myCHANGEDtoYear"]
}
}
}
}

response = {"jobId": [64990]}

"The response has an array or list of jobId elements that were updated" according to the documentation so the change should have been applied.

But when I GET the job from the .../jobs/64990 endpoint, "version" is still 0, and my source parameters are unchanged.

The problem:
1) it seems wrong that the reportUnitURI parameter would be mandatory
2) the job parameters are left unchanged

Impact:
we had to create a program that GETs the entire job/id, applies the change, and overwrites the job with the changed job/id (POST)

Our setup:
Our server is an Ubuntu 18.04 LTS, database = default/embedded postgres, application server = default/embedded tomcat.

v7.8.0
rest api v2
garama6503's picture
Joined: Dec 19 2019 - 11:50pm
Last seen: 1 month 2 weeks ago
Feedback