maybe fixed?
This commit is contained in:
parent
3b37b18581
commit
80110a6960
20
main/main.go
20
main/main.go
@ -37,7 +37,25 @@ func MPE_IsProject(input *Payload) (projectnumber string, project_name string) {
|
||||
for keyvalue, value := range separated_path {
|
||||
matched := project_regex.MatchString(value)
|
||||
// Possible Fix for Project 3rd Number ID.
|
||||
ProjectSection := keyvalue == 2|3|4 // /shared<0>/N-Data<1>/<2>/<3>/<4>/<5>/<6>
|
||||
var ProjectSection bool // <0>/shared<1>/N-Data<2>/<3>/<4>/<5>/<6>/<7>
|
||||
|
||||
switch keyvalue {
|
||||
case 0:
|
||||
ProjectSection = false // "blank"
|
||||
case 1:
|
||||
ProjectSection = false // shared
|
||||
case 2:
|
||||
ProjectSection = false // N-Data
|
||||
case 3:
|
||||
ProjectSection = true // 2 digit
|
||||
case 4:
|
||||
ProjectSection = true // 2 digit client name
|
||||
case 5:
|
||||
ProjectSection = true // Project Number
|
||||
case 6:
|
||||
ProjectSection = true // Phase
|
||||
|
||||
}
|
||||
|
||||
if matched && ProjectSection {
|
||||
// if we match the Regex above, write values to SB. This will give us a string like "73|10 Office Of Somone|153 HelpMe|002 Phase 2"
|
||||
|
Loading…
Reference in New Issue
Block a user