CRM-14022 Not all Contribution Statuses are usable

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.4.3
    • Fix Version/s: 4.5
    • Component/s: CiviContribute, CiviCRM API
    • Labels:
      None

      Description

      The default contribution Status option group as listed here: http://drupal.demo.civicrm.org/civicrm/admin/optionValue?gid=11&reset=1

      Using the API it is not possible to use all of the default contribution states due to some code in CRM_Contribute_BAO_Contribution:: checkStatusValidation

      For example, I want to change a contribution which was created using the API with initial state of "In Progress" to state "Completed".

      This fails due to the code in checkStatusValidation only allowing for state transitions between the states which are hard coded in this function. This hard coded list doesn't include all of the states that are included by default in the option group listed above which as a minimum it probably should.

      As a more general point, hard coding these state transitions isn't ideal, as it prevents users from creating custom contribution statuses in the option group and using these through the API or UI.

        Attachments

          Issue Links

            Activity

            [CRM-14022] Not all Contribution Statuses are usable
            Eileen McNaughton added a comment -

            Joe this looks more like your area than mine. Just reading the ticket - it seems like maybe there is a list of defined OK transitions & perhaps it should just be defined not OK transitions

            Joe Murray added a comment -

            Dave, could you confirm that this is a duplicate, maybe moving stuff from here re: API to other issue, and close this issue? Thx.

            David Greenberg added a comment -

            The primary issue here is that the transition from 'In Progress' to 'Completed' status needs to be handled (currently it's not supported). This will be implemented for 4.4 as part of http://issues.civicrm.org/jira/browse/CRM-13968.

              People

              • Assignee:
                David Greenberg
                Reporter:
                paul campbell

                Dates

                • Created:
                  Updated:
                  Resolved: