Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

set Jira ID for v5 #49

Merged
merged 1 commit into from
Jun 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/main/com/topcoder/web/ejb/pacts/PactsServicesBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -3945,9 +3945,8 @@ private long insertPaymentDetail(Connection c, Payment p, long operatorUserId) t
ps.setNull(i, Types.DECIMAL);
}
ps.setNull(26, Types.DECIMAL);
// Always set the jira id value. This is to support v5 task payments since they don't satisfy any of the reference types below.
// ps.setNull(27, Types.VARCHAR);
setNullableString(ps, 27, p.getHeader().getJiraIssueName());
ps.setNull(27, Types.VARCHAR);

switch (BasePayment.getReferenceTypeId(p.getHeader().getTypeId())) {
case REFERENCE_ALGORITHM_ROUND_ID:
setNullableLong(ps, 14, p.getHeader().getAlgorithmRoundId());
Expand Down Expand Up @@ -3986,6 +3985,10 @@ private long insertPaymentDetail(Connection c, Payment p, long operatorUserId) t
ps.setBoolean(23, p.isCharity());
ps.setDouble(24, p.getTotalAmount() == 0 ? p.getGrossAmount() : p.getTotalAmount()); // default to gross amount if not filled.
ps.setInt(25, p.getInstallmentNumber());

// Set the jira ID all the time to support v5
log.info("Jira ID: " + p.getHeader().getJiraIssueName());
setNullableString(ps, 27, p.getHeader().getJiraIssueName());

if (operatorUserId != 0) {
ps.setLong(28, operatorUserId);
Expand Down