Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 962bcce

Browse files
authoredJun 21, 2021
Merge pull request #49 from topcoder-platform/v5-payment-jira-id-patch
set Jira ID for v5
2 parents 9778941 + a46b4c2 commit 962bcce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎src/main/com/topcoder/web/ejb/pacts/PactsServicesBean.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3945,9 +3945,8 @@ private long insertPaymentDetail(Connection c, Payment p, long operatorUserId) t
39453945
ps.setNull(i, Types.DECIMAL);
39463946
}
39473947
ps.setNull(26, Types.DECIMAL);
3948-
// Always set the jira id value. This is to support v5 task payments since they don't satisfy any of the reference types below.
3949-
// ps.setNull(27, Types.VARCHAR);
3950-
setNullableString(ps, 27, p.getHeader().getJiraIssueName());
3948+
ps.setNull(27, Types.VARCHAR);
3949+
39513950
switch (BasePayment.getReferenceTypeId(p.getHeader().getTypeId())) {
39523951
case REFERENCE_ALGORITHM_ROUND_ID:
39533952
setNullableLong(ps, 14, p.getHeader().getAlgorithmRoundId());
@@ -3986,6 +3985,10 @@ private long insertPaymentDetail(Connection c, Payment p, long operatorUserId) t
39863985
ps.setBoolean(23, p.isCharity());
39873986
ps.setDouble(24, p.getTotalAmount() == 0 ? p.getGrossAmount() : p.getTotalAmount()); // default to gross amount if not filled.
39883987
ps.setInt(25, p.getInstallmentNumber());
3988+
3989+
// Set the jira ID all the time to support v5
3990+
log.info("Jira ID: " + p.getHeader().getJiraIssueName());
3991+
setNullableString(ps, 27, p.getHeader().getJiraIssueName());
39893992

39903993
if (operatorUserId != 0) {
39913994
ps.setLong(28, operatorUserId);

0 commit comments

Comments
 (0)
This repository has been archived.