[ 
https://issues.apache.org/jira/browse/FINERACT-2417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18047305#comment-18047305
 ] 

Satvik Mishra commented on FINERACT-2417:
-----------------------------------------

Hi [~bgowda] , thanks for assigning this issue to me.

I am analyzing the code and just want to confirm the expected behavior before I 
apply a fix.

Currently, the API returns the raw template definition (JSON) where the text is 
{{{}Hello \{{client.displayName}}{}}}.

When {{clientId}} is passed in the URL, is the API expected to:
 # Return the *merged/compiled report* (e.g., just the text "Hello Satvik 
Mishra")?

 # Or is it still supposed to return the {*}JSON object{*}, but with the values 
inside {{text}} replaced?

Right now, the backend ignores the {{clientId}} parameter entirely and just 
returns the static JSON definition. Once you confirm which output format is 
required, I can implement the fix.

> Template Reports not working
> ----------------------------
>
>                 Key: FINERACT-2417
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2417
>             Project: Apache Fineract
>          Issue Type: Improvement
>    Affects Versions: 1.13.0
>            Reporter: Bharath Gowda
>            Assignee: Satvik Mishra
>            Priority: Major
>             Fix For: 1.15.0
>
>         Attachments: Screenshot 2025-12-12 at 11.34.33 AM.png, 
> image-2025-12-11-19-38-36-915.png, image-2025-12-12-11-39-40-963.png, 
> image-2025-12-12-11-39-49-125.png
>
>
> To reproduce the issue
>  
> 1. Create a sample template for the client or loan entity.
>      under Admin->Templates->create template
> 2. Execute the report from the client/loan screen respectively
>      Under the client screen->menu->more->client screen reports,
>      select the created report and generate the report.
>  
> System is throwing a 404 OK error
> Expected Fix
>  # If the API is used in UI to generate the template report exists or wrong 
> API
>  ## If wrong API data, could anyone help with the correct API and body for 
> running the template reports?
>  # Is this a backend bug?
>  ## If yes, please help in fixing the same with the below example API and 
> response.
>  
>  
> Full error example
> API
> [https://URL/fineract-provider/api/v1/templates/1?clientId=10|https://url/fineract-provider/api/v1/templates/1?clientId=10]
> body: "{}"
> "accept": "application/json, text/plain, */*",
> "accept-language": "en-IN,en-GB;q=0.9,en-US;q=0.8,en;q=0.7",
>  "authorization": "Basic Y2hhcmxlczpDaGFybGVzQDEyMyM=",
> "fineract-platform-tenantid": "default",
>  
> Error Response
>  
> {"developerMessage":"The requested resource is not 
> available.","httpStatusCode":"404","defaultUserMessage":"The requested 
> resource is not 
> available.","userMessageGlobalisationCode":"error.msg.resource.not.found","errors":[\{"defaultUserMessage":"Template
>  with url 
> https://tomcat/fineract-provider/api/clients/10?tenantIdentifier=default not 
> allowed","parameterName":"id","developerMessage":"Template with url 
> https://tomcat/fineract-provider/api/clients/10?tenantIdentifier=default not 
> allowed","userMessageGlobalisationCode":"error.msg.template.url.forbidden","args":[]}]}
>  
>  
> Expected result
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to