Set closed date from this issue

 @param [Hash] event
 @param [Hash] issue
474
def set_date_from_event(event, issue)
      if event["commit_id"].nil?
        issue["actual_date"] = issue["closed_at"]
      else
        begin
          commit = @fetcher.fetch_commit(event["commit_id"])
          issue["actual_date"] = commit["commit"]["author"]["date"]

          # issue['actual_date'] = commit['author']['date']
        rescue StandardError
          puts "Warning: Can't fetch commit #{event['commit_id']}. It is probably referenced from another repo."
          issue["actual_date"] = issue["closed_at"]
        end
      end
    end
881074
def manage_event(self, event) -> None:
        
        name = EVENT_NAME.format(
            topic=event[EVENT_TOPIC], source=event.get(EVENT_SOURCE_IDX))

        if event[EVENT_OPERATION] == 'Initialized' and name not in self.events:

            for event_class in EVENT_CLASSES:
                if event_class.TOPIC in event[EVENT_TOPIC]:
                    self.events[name] = event_class(event)
                    self.signal('add', name)
                    return

            _LOGGER.debug('Unsupported event %s', event[EVENT_TOPIC])

        elif event[EVENT_OPERATION] == 'Changed' and name in self.events:
            self.events[name].state = event[EVENT_VALUE]
952844
def fetch_events_async(issues)
      i       = 0
      threads = []

      issues.each_slice(MAX_THREAD_NUMBER) do |issues_slice|
        issues_slice.each do |issue|
          threads << Thread.new do
            issue["events"] = []
            iterate_pages(@client, "issue_events", issue["number"]) do |new_event|
              issue["events"].concat(new_event)
            end
            issue["events"] = issue["events"].map { |event| stringify_keys_deep(event.to_hash) }
            print_in_same_line("Fetching events for issues and PR: #{i + 1}/#{issues.count}")
            i += 1
          end
        end
        threads.each(&:join)
        threads = []
      end

      # to clear line from prev print
      print_empty_line

      Helper.log.info "Fetching events for issues and PR: #{i}"
    end
342469
public void sendEvent(Event event) {
        for (ShouldSendEventCallback shouldSendEventCallback : shouldSendEventCallbacks) {
            if (!shouldSendEventCallback.shouldSend(event)) {
                logger.trace("Not sending Event because of ShouldSendEventCallback: {}", shouldSendEventCallback);
                return;
            }
        }

        try {
            connection.send(event);
        } catch (LockedDownException | TooManyRequestsException e) {
            logger.debug("Dropping an Event due to lockdown: " + event);
        } catch (Exception e) {
            logger.error("An exception occurred while sending the event to Sentry.", e);
        } finally {
            getContext().setLastEventId(event.getId());
        }
    }
424135
def on_close(code, reason)
      debug "Server closed connection with code #{code}: #{reason}"

      case code
      when 4001
        handle_invalid_token
      when 4010
        handle_invalid_version(reason)
      when 4040, 4041
        handle_invalid_connection(reason)
      else
        warn "connection closed with code #{code}: #{reason}"
      end
    end
1176838
public void setRevokedEnd(Date revokedEnd) throws InvalidArgumentException {
        if (revokedEnd == null) {
            throw new InvalidArgumentException("Date can't be null");
        }
        queryParms.put("revoked_end", Util.dateToString(revokedEnd));
    }
996448
def submit_and_wait
      raise ArgumentError, "#{self.class}#dev_handle not set" unless @dev_handle

      @completion_flag.completed = false
      submit! do |tr2|
        @completion_flag.completed = true
      end

      until @completion_flag.completed?
        begin
          @dev_handle.device.context.handle_events nil, @completion_flag
        rescue ERROR_INTERRUPTED
          next
        rescue LIBUSB::Error
          cancel!
          until @completion_flag.completed?
            @dev_handle.device.context.handle_events nil, @completion_flag
          end
          raise
        end
      end
    end
1206250
private void onParticipantRemoved(ParticipantRemovedEvent event) {
        handler.post(() -> listener.onParticipantRemoved(event));
        log("Event published " + event.toString());
    }
601709
private void handleIncomingEvent(final Message message) {
        switch (EventTopic.valueOf(getStringHeaderKey(message, MessageHeaderKey.TOPIC, "EventTopic is null"))) {
        case UPDATE_ACTION_STATUS:
            updateActionStatus(message);
            break;
        case UPDATE_ATTRIBUTES:
            updateAttributes(message);
            break;
        default:
            logAndThrowMessageError(message, "Got event without appropriate topic.");
            break;
        }

    }
213918
def call(issue)
      status = decode_status(issue)
      {
          key: issue.key,
          type: issue.issuetype.name,
          priority: issue.priority.name,
          status: status,
          #description: i.description,
          summary: issue.summary,
          created_date: issue.created,
          closed_date: issue.resolutiondate
      }
    end
738331
def method_missing(method_name, *args, &_block)
      args = args.first if args.size == 1
      @events[method_name] = args
    end
685713
@UiHandler("m_dateModifiedStartDateBox")
    protected void onDateModifiedStartChange(ValueChangeEvent<Date> event) {

        if (event.getValue() != null) {
            m_tabHandler.setDateModifiedStart(event.getValue().getTime());
        } else {
            // if the field is empty take the min value
            m_tabHandler.setDateModifiedStart(-1L);
        }
    }
80302
def on(event)
      EVENT_TYPES.include?(event) or (self.class.logger.error "Invalid event #{event}" and return)
      block_given? and @blocks[event] << Proc.new
    end
210720
def event_happened(event_name, model)
      self.last_action = event_name
      self.last_updated_node = model
      self.updated_at = Time.zone.now
      self.save!
    end
183498
function issue(eat, value, silent) {
  var self = this
  var index
  var start
  var subvalue
  var href
  var now
  var exit
  var node

  if (value.charCodeAt(0) === CC_HASH) {
    index = 1
  } else if (value.slice(0, PREFIX.length).toLowerCase() === PREFIX) {
    index = PREFIX.length
  } else {
    return
  }

  start = index
  index = issueEnd(value, index)

  if (index === -1) {
    return
  }

  /* istanbul ignore if - maybe used by plug-ins */
  if (silent) {
    return true
  }

  now = eat.now()
  href = gh(self.githubRepo) + 'issues' + C_SLASH + value.slice(start, index)
  subvalue = value.slice(0, index)

  now.column += start

  exit = self.enterLink()

  node = eat(subvalue)({
    type: 'link',
    title: null,
    url: href,
    children: self.tokenizeInline(subvalue, now)
  })

  exit()

  return node
}
230035
function (evt) {
            // when clicking on a date in the calendar, close the calendar, and save the date
            var date = evt.date;
            this._closeDropdown();

            var report = this.controller.checkValue(date);
            this._reactToControllerReport(report);
        }
1044808
@Override
    public void setDate(String parameterName, Date x) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }