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

ASF GitHub Bot commented on FINERACT-611:
-----------------------------------------

ShruthiRajaram closed pull request #461: FINERACT-611 unable to create share 
product
URL: https://github.com/apache/fineract/pull/461
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java
index 9dbb75e26..4b517e8eb 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java
@@ -118,10 +118,11 @@ public ShareProduct validateAndCreate(JsonCommand 
jsonCommand) {
         final String shortName = 
this.fromApiJsonHelper.extractStringNamed(ShareProductApiConstants.shortname_paramname,
 element);
         
baseDataValidator.reset().parameter(ShareProductApiConstants.shortname_paramname).value(shortName).notBlank()
                 .notExceedingLengthOf(4);
-        String description = null;
-        if 
(this.fromApiJsonHelper.parameterExists(ShareProductApiConstants.description_paramname,
 element)) {
-            description = 
this.fromApiJsonHelper.extractStringNamed(ShareProductApiConstants.description_paramname,
 element);
-        }
+        
+               final String description = this.fromApiJsonHelper
+                               
.extractStringNamed(ShareProductApiConstants.description_paramname, element);
+               
baseDataValidator.reset().parameter(ShareProductApiConstants.description_paramname).value(description)
+                               .notBlank().notExceedingLengthOf(500);
 
         String externalId = 
this.fromApiJsonHelper.extractStringNamed(ShareProductApiConstants.externalid_paramname,
 element);
         // 
baseDataValidator.reset().parameter(ShareProductApiConstants.externalid_paramname).value(externalId).notBlank();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Unable to Create Share Product showing 'Unknown data integrity issue'
> ---------------------------------------------------------------------
>
>                 Key: FINERACT-611
>                 URL: https://issues.apache.org/jira/browse/FINERACT-611
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Shares
>            Reporter: Santosh Math
>            Assignee: Shruthi  M R
>            Priority: Blocker
>              Labels: gsoc, p1
>         Attachments: shareProduct.png
>
>
> Go to  Admin>Products> Share Products  and then click on 'Create Share 
> Product'
> Give inputs to all mandatory fields and at the last stage if you try to 
> submit, it's throwing the data integrity issue. check the screenshot attached 
> with  this issue. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to