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

Commit

Permalink
Preparing for the next release
Browse files Browse the repository at this point in the history
  • Loading branch information
haiphucnguyen committed Apr 15, 2019
1 parent 2549d08 commit 0f88919
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Free, open source Project Management software
[![License](http://img.shields.io/badge/License-AGPLv3-orange.svg)](https://www.gnu.org/licenses/agpl-3.0.en.html) [![Project Stats](https://www.openhub.net/p/mycollab/widgets/project_thin_badge.gif)](https://www.openhub.net/p/mycollab) [![Build](https://travis-ci.org/MyCollab/mycollab.svg)](https://travis-ci.org/MyCollab/mycollab)
[![Version](https://img.shields.io/badge/Version-7.0.1-brightgreen.svg)](https://docs.mycollab.com/)
[![Version](https://img.shields.io/badge/Version-7.0.2-brightgreen.svg)](https://docs.mycollab.com/)
[![Github](https://img.shields.io/github/downloads/MyCollab/mycollab/total.svg)](https://github.com/MyCollab/mycollab/releases)


Expand Down
1 change: 1 addition & 0 deletions mycollab-app-community/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@
<fileset dir="${basedir}/src/main/lib"/>
</copy>
<chmod dir="${installer.staging.dir}/bin/" includes="*.sh" perm="700"/>
<fixcrlf srcdir="${installer.staging.dir}/bin/" includes="**/*.bat" eol="crlf"/>
</target>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ ADD COLUMN `rel` VARCHAR(45) NULL AFTER `typeId`,
ADD COLUMN `comment` TEXT NULL AFTER `rel`,
CHANGE COLUMN `ticketType` `ticketType` VARCHAR(45) NOT NULL AFTER `ticketId`;

UPDATE m_prj_ticket_relation SET rel=type WHERE id > 0
UPDATE m_prj_ticket_relation SET rel=type WHERE id > 0;

UPDATE m_prj_ticket_relation SET type='Project-Version' WHERE rel IN ('AffVersion', 'FixVersion') AND id > 0
UPDATE m_prj_ticket_relation SET type='Project-Component' WHERE rel IN ('Component') AND id > 0
UPDATE m_prj_ticket_relation SET type='Project-Version' WHERE rel IN ('AffVersion', 'FixVersion') AND id > 0;
UPDATE m_prj_ticket_relation SET type='Project-Component' WHERE rel IN ('Component') AND id > 0;

ALTER TABLE `m_prj_ticket_relation`
CHANGE COLUMN `rel` `rel` VARCHAR(45) NOT NULL ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ interface TicketKeyMapperExt {

fun getPreviousKey(projectId: Int, currentKey: Int): Int?

fun getTicketKeyByPrjShortNameAndKey(prjShortName:String, ticketKey:Int): TicketKey
fun getTicketKeyByPrjShortNameAndKey(sAccountId: Int, prjShortName:String, ticketKey:Int): TicketKey
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.mycollab.module.project.domain.TicketKey
*/
interface TicketKeyService {

fun getTicketKeyByPrjShortNameAndKey(prjShortName:String, key:Int): TicketKey?
fun getTicketKeyByPrjShortNameAndKey(sAccountId: Int, prjShortName:String, key:Int): TicketKey?

fun getMaxKey(projectId: Int): Int?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.springframework.stereotype.Service
*/
@Service
class TicketKeyServiceImpl(private val ticketKeyMapper: TicketKeyMapper,
private val ticketKeyMapperExt: TicketKeyMapperExt): TicketKeyService {
private val ticketKeyMapperExt: TicketKeyMapperExt) : TicketKeyService {
override fun getMaxKey(projectId: Int): Int? = ticketKeyMapperExt.getMaxKey(projectId)

override fun saveKey(projectId: Int, ticketId: Int, ticketType: String, ticketKey: Int) {
Expand All @@ -28,5 +28,6 @@ class TicketKeyServiceImpl(private val ticketKeyMapper: TicketKeyMapper,

override fun getPreviousKey(projectId: Int, currentKey: Int): Int? = ticketKeyMapperExt.getPreviousKey(projectId, currentKey)

override fun getTicketKeyByPrjShortNameAndKey(prjShortName: String, ticketKey: Int): TicketKey = ticketKeyMapperExt.getTicketKeyByPrjShortNameAndKey(prjShortName, ticketKey)
override fun getTicketKeyByPrjShortNameAndKey(sAccountId: Int, prjShortName: String, ticketKey: Int): TicketKey =
ticketKeyMapperExt.getTicketKeyByPrjShortNameAndKey(sAccountId, prjShortName, ticketKey)
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
SELECT m_prj_ticket_key.id, m_prj_ticket_key.projectId, m_prj_ticket_key.ticketId,
m_prj_ticket_key.ticketType, m_prj_ticket_key.ticketKey
FROM m_prj_ticket_key, m_prj_project
WHERE m_prj_project.shortName = @{prjShortName, jdbcType=VARCHAR}
WHERE m_prj_project.sAccountId = @{sAccountId, jdbcType=NUMERIC}
AND m_prj_project.shortName = @{prjShortName, jdbcType=VARCHAR}
AND m_prj_ticket_key.projectId = m_prj_project.id
AND m_prj_ticket_key.ticketKey = @{ticketKey, jdbcType=NUMERIC}
]]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TicketUrlResolver : ProjectUrlResolver() {
val prjShortName = ProjectLinkParams.getProjectShortName(params[0])
val itemKey = ProjectLinkParams.getItemKey(params[0])
val ticketKeyService = AppContextUtil.getSpringBean(TicketKeyService::class.java)
val ticketKey = ticketKeyService.getTicketKeyByPrjShortNameAndKey(prjShortName, itemKey)
val ticketKey = ticketKeyService.getTicketKeyByPrjShortNameAndKey(AppUI.accountId, prjShortName, itemKey)
if (ticketKey != null) {
when(ticketKey.tickettype) {
ProjectTypeConstants.TASK -> {
Expand Down Expand Up @@ -125,13 +125,12 @@ class TicketUrlResolver : ProjectUrlResolver() {
val prjShortName = ProjectLinkParams.getProjectShortName(params[0])
val itemKey = ProjectLinkParams.getItemKey(params[0])
val ticketKeyService = AppContextUtil.getSpringBean(TicketKeyService::class.java)
val ticketKey = ticketKeyService.getTicketKeyByPrjShortNameAndKey(prjShortName, itemKey)
val ticketKey = ticketKeyService.getTicketKeyByPrjShortNameAndKey(AppUI.accountId, prjShortName, itemKey)
if (ticketKey != null) {
when(ticketKey.tickettype) {
ProjectTypeConstants.TASK -> {
val taskService = AppContextUtil.getSpringBean(TaskService::class.java)
val task = taskService.findById(ticketKey.ticketid, AppUI.accountId) ?: throw ResourceNotFoundException("Can not find task with path ${Arrays.toString(params)}")
when (task) {
when (val task = taskService.findById(ticketKey.ticketid, AppUI.accountId) ?: throw ResourceNotFoundException("Can not find task with path ${Arrays.toString(params)}")) {
null -> throw ResourceNotFoundException("Can not edit task with path ${Arrays.toString(params)}")
else -> {
val chain = PageActionChain(ProjectScreenData.Goto(task.projectid), TaskScreenData.Edit(task))
Expand Down

0 comments on commit 0f88919

Please sign in to comment.