Bug 1211849

Summary: RFE: As a project maintainer, I want to be able to change my project/version slug
Product: [Retired] Zanata Reporter: Alex Eng <aeng>
Component: Component-LogicAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Damian Jansen <djansen>
Severity: high Docs Contact:
Priority: high    
Version: 3.7CC: dchen, djansen, mkim, pahuang, zanata-bugs
Target Milestone: ---Keywords: Triaged
Target Release: 3.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.7.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-3524) Doc Type: Bug Fix
Doc Text:
Story Points: 3
Clone Of: Environment:
Last Closed: 2015-07-22 02:20:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1082840    

Description Alex Eng 2015-04-15 05:55:41 UTC
Points from discussion:

- Allow change of slug for project/version after creation.

Comment 1 David Mason 2015-04-22 03:44:34 UTC
What to implement (from dev team discussion):

 - Allow maintainer to change slug to an available slug on the settings page.
   - Same sort of validation messages for unavailable slug as when creating a new project/version.
 - Make it clear to the user that changing will break the links to the project/version.
 - Old slug is available immediately.
 - Make sure tooltips & help do not say that it cannot be changed.
 - A renamed project-version should still show up in a group that it was in (with the new name).

Technical note: has to invalidate cache and lucene indexes.

Comment 2 Patrick Huang 2015-05-04 04:19:29 UTC
All open editor session (workspace) will become invalid after slug change. Need to sent notification to editor or even force redirect to new url

Comment 3 Patrick Huang 2015-05-04 06:41:20 UTC
From what I can see in our code, we index project version slug but never really query it.
We used to use lucene search in project wide search but then switched back to HQL.   There is a boolean value to switch between the two implementation.
Right now, it is not used. But I will re-index it anyway after a version slug change.

see:
org.zanata.service.impl.TranslationMemoryServiceImpl#buildContextQuery
org.zanata.hibernate.search.ContainingWorkspaceBridge#set
org.zanata.service.impl.TextFlowSearchServiceImpl#findTextFlowsByDocumentPaths

Comment 4 Patrick Huang 2015-05-06 05:56:29 UTC
https://github.com/zanata/zanata-server/pull/796

Comment 5 Patrick Huang 2015-05-11 01:13:35 UTC
comment 3 is no longer true. we don't index version slug any more.

Comment 6 Damian Jansen 2015-05-19 00:59:46 UTC
Verified (master) at 4995a027ab73f0b1e2ea734fc5a7db43b92ee37d