[
https://issues.apache.org/jira/browse/FINERACT-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18056447#comment-18056447
]
Md Saiful Islam commented on FINERACT-2045:
-------------------------------------------
hi,
I was preparing to work on this issue. It appears to be resolved in the current
'develop' branch.
*Verification Steps:*
# Checked out {{develop}} branch (latest commit).
# Created a new GL account not linked to any activity.
# Attempted to delete the account.
# *Result:* The account was deleted successfully without the
{{DataIntegrityViolationException}} or JPA error mentioned in the description.
I have also written a unit test using Mockito under the fineract-provider:test
path:
org.apache.fineract.accounting.glaccount.service.
Should I create a PR for the unit test? I want your suggestion.
> Deleting a GL account that is not tagged to any financial activity, mapped to
> a product and does not have journal entries fails
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: FINERACT-2045
> URL: https://issues.apache.org/jira/browse/FINERACT-2045
> Project: Apache Fineract
> Issue Type: Bug
> Components: Accounting
> Affects Versions: 1.9.0
> Reporter: John Ruhiu
> Assignee: Md Saiful Islam
> Priority: Major
> Labels: beginner-friendly
>
> It should be possible to delete a GL account that is
> # Not linked to any financial activity
> # Not mapped to any products
> # Does not have any journal entries
> However, trying to delete such a GL account fails with the following error
> message:
> The attribute [glAccountId] is not present in the managed type
> [EntityTypeImpl@650953026:JournalEntry [ javaType: class
> org.apache.fineract.accounting.journalentry.domain.JournalEntry descriptor:
> RelationalDescriptor(org.apache.fineract.accounting.journalentry.domain.JournalEntry
> --> [DatabaseTable(acc_gl_journal_entry)]), mappings: 25]].
>
> Steps to replicate
> # Create a GL account in the chart of accounts
> # and try to delete the account immediately after
--
This message was sent by Atlassian Jira
(v8.20.10#820010)