diff options
author | jmisinco | 2016-08-04 19:16:09 +0000 |
---|---|---|
committer | John Misinco | 2016-08-05 14:29:07 +0000 |
commit | 7c0435c8f4127827718253f6207a72df252821fa (patch) | |
tree | 91fc2b9274f4fbf6d9fd59a41339921845eb92a4 | |
parent | 2731e1f2ac15fa4cd3ca787a2c6c6843d27eca9e (diff) | |
download | org.eclipse.osee-7c0435c8f4127827718253f6207a72df252821fa.tar.gz org.eclipse.osee-7c0435c8f4127827718253f6207a72df252821fa.tar.xz org.eclipse.osee-7c0435c8f4127827718253f6207a72df252821fa.zip |
bug[ats_ATS306960]: Change Report title is 0
Change-Id: I7350f789ce5f167c20c9ca438437b46f6d492575
2 files changed, 11 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java index 934aa314bcf..fdc346c90a2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java @@ -205,6 +205,14 @@ public final class TransactionManager { return getTransactionRecord(txId); } + public static String getComment(long txId) { + return getTransactionRecord(txId).getComment(); + } + + public static String getComment(TransactionId tx) { + return getComment(tx.getId()); + } + private static TransactionRecord getTransactionRecord(long txId) { JdbcClient jdbcClient = ConnectionHandler.getJdbcClient(); return jdbcClient.fetchOrException( diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java index b88f004ab5c..1512efe50a4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/presenter/SpecificTxsHandler.java @@ -15,6 +15,7 @@ import java.util.logging.Level; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.AXml; +import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.skynet.core.artifact.BranchManager; import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager; @@ -46,11 +47,8 @@ public final class SpecificTxsHandler implements IChangeReportUiHandler { OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex); branchName = "Unknown"; } - String toReturn; - Long commitArtId = TransactionManager.getCommitArtId(txDelta.getEndTx()); - if (commitArtId != null) { - toReturn = String.format("%s", commitArtId); - } else { + String toReturn = TransactionManager.getComment(txDelta.getEndTx()); + if (!Strings.isValid(toReturn)) { toReturn = String.format("%s - Transactions", branchName); } return toReturn; |