Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83430

Callback from customfield_number provider is called too late when exporting value

XMLWordPrintable

      In MDL-82715 we introduced providers for the customfield_number that automatically populate the field with some calculated values.

      However we made a mistake in the \customfield_number\field_controller::prepare_field_for_display() and it calls the provider too late.

      It assumes that every provider has 'decimalplaces' and 'displaywhenzero' properties. And also applies format_string() always, even if provider wants to return some html that should not be cleaned.

      To preserve the behavior of the default method we will move format_string() call into the default implementation of the customfield_number\provider_base::prepare_export_value()

            marina Marina Glancy
            marina Marina Glancy
            Ilya Tregubov Ilya Tregubov
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 30 minutes
                1d 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.