日付を含むJiraカスタムフィールド(例:2011年11月13日)を解析するとき、私はこれから始めました:
elsif custom.customfieldId == "customfield_10282"
@agenda_item.planned_release_date = custom.values.to_s
しかし、データベースはそれを11/13/0011として保存します。だから私は賢くなり、これを使用しました:
elsif custom.customfieldId == "customfield_10282"
@agenda_item.planned_release_date = Date.strptime(custom.values, "%d/%m/%Y")
そして今、私は得ます:
プライベートメソッドsub!' called for ["15/Nov/11"]:Jira4R::V2::ArrayOf_xsd_string
C:/Ruby187/lib/ruby/1.8/date/format.rb:429:in
_strptime_i'C:/Ruby187/lib/ruby/1.8/date/format.rb:401:in scan'
C:/Ruby187/lib/ruby/1.8/date/format.rb:401:in
_strptime_i' C:/Ruby187/lib/ruby/1.8/date/format.rb:601:in `_strptime' [スタックの残りの部分を切り捨てました]
私は何が欠けていますか?